Documentation ¶
Index ¶
- Variables
- func Covert(args *Args) (string, error)
- func FmtFieldName(s string) string
- func Generate(input io.Reader, parser Parser, structName, pkgName string, tags []string, ...) ([]byte, error)
- func ParseJSON(input io.Reader) (interface{}, error)
- func ParseYaml(input io.Reader) (interface{}, error)
- type Args
- type Parser
Constants ¶
This section is empty.
Variables ¶
View Source
var ForceFloats bool
ForceFloats whether to force a change to float
Functions ¶
func FmtFieldName ¶
FmtFieldName formats a string as a struct key
Example:
FmtFieldName("foo_id")
Output: FooID
func Generate ¶
func Generate(input io.Reader, parser Parser, structName, pkgName string, tags []string, subStruct bool, convertFloats bool) ([]byte, error)
Generate a struct definition given a JSON string representation of an object and a name structName.
Types ¶
Click to show internal directories.
Click to hide internal directories.