MCPcopy
hub / github.com/pquerna/ffjson / Sort

Method Sort

inception/inception.go:98–98  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

96func (p sortedStructs) Less(i, j int) bool { return p[i].Name < p[j].Name }
97func (p sortedStructs) Swap(i, j int) { p[i], p[j] = p[j], p[i] }
98func (p sortedStructs) Sort() { sort.Sort(p) }
99
100func (i *Inception) generateCode() error {
101 // We sort the structs by name, so output if predictable.

Callers 1

generateCodeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected