Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMemberByJSON ¶
GetMemberByJSON returns the child member of the type that has the given JSON name. It returns nil if no such member exists.
func IsDirectComparable ¶
IsDirectComparable returns true if the type is safe to compare using "==". It is similar to gengo.IsComparable, but it doesn't consider Pointers to be comparable (we don't want shallow compare).
func IsNilableType ¶
IsNilableType returns true if the argument type can be compared to nil.
func NativeType ¶
NativeType returns the Go native type of the argument type, with any intermediate typedefs removed. Go itself already flattens typedefs, but this handles it in the unlikely event that we ever fix that.
Examples: * Trivial:
- given `int`, returns `int`
- given `*int`, returns `*int`
- given `[]int`, returns `[]int`
* Typedefs
- given `type X int; X`, returns `int`
- given `type X int; []X`, returns `[]X`
* Typedefs and pointers:
- given `type X int; *X`, returns `*int`
- given `type X *int; *X`, returns `**int`
- given `type X []int; X`, returns `[]int`
- given `type X []int; *X`, returns `*[]int`
Types ¶
This section is empty.