gotypes: doc exported symbols (#9)

This commit is contained in:
Michael McLoughlin
2019-01-04 20:38:21 -08:00
parent 69aeaf5cf7
commit 52a501c7be
4 changed files with 53 additions and 11 deletions

16
gotypes/examples_test.go Normal file
View 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>
}