github.com/phsym/gomarkdoc@v0.5.4/testData/lang/function/func_test.go (about) 1 package function_test 2 3 import ( 4 "fmt" 5 6 "github.com/phsym/gomarkdoc/testData/lang/function" 7 ) 8 9 func ExampleStandalone() { 10 res, _ := function.Standalone(2, "abc") 11 fmt.Println(res) 12 // Output: 2 13 } 14 15 func ExampleStandalone_zero() { 16 res, _ := function.Standalone(0, "def") 17 fmt.Println(res) 18 // Output: 0 19 } 20 21 func ExampleReceiver() { 22 r := &function.Receiver{} 23 fmt.Println(r) 24 } 25 26 func ExampleReceiver_subTest() { 27 var r function.Receiver 28 r.WithReceiver() 29 } 30 31 func ExampleGeneric_WithGenericReceiver() { 32 r := function.Generic[int]{} 33 r.WithGenericReceiver() 34 }