gotypes: doc exported symbols (#9)
This commit is contained in:
16
gotypes/examples_test.go
Normal file
16
gotypes/examples_test.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package gotypes_test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/mmcloughlin/avo/gotypes"
|
||||
)
|
||||
|
||||
func ExampleParseSignature() {
|
||||
s, err := gotypes.ParseSignature("func(s string, n int) string")
|
||||
fmt.Println(s)
|
||||
fmt.Println(err)
|
||||
// Output:
|
||||
// (s string, n int) string
|
||||
// <nil>
|
||||
}
|
||||
Reference in New Issue
Block a user