You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
go-zero/tools/goctl/api/spec/example_test.go

17 lines
284 B
Go

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]
}