feat(goctl): better generate the api code of typescript (#2483)

This commit is contained in:
foliet
2022-10-11 22:19:22 +08:00
committed by GitHub
parent 74cc6b55e8
commit 799c118d95
4 changed files with 88 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
package spec_test
import (
"fmt"
"github.com/zeromicro/go-zero/tools/goctl/api/spec"
)
func ExampleMember_GetEnumOptions() {
member := spec.Member{
Tag: `json:"foo,options=foo|bar|options|123"`,
}
fmt.Println(member.GetEnumOptions())
// Output:
// [foo bar options 123]
}