MCPcopy Create free account
hub / github.com/goadesign/goa / sorted

Function sorted

expr/hasher.go:126–134  ·  view source on GitHub ↗
(o *Object)

Source from the content-addressed store, hash-verified

124}
125
126func sorted(o *Object) Object {
127 if o == nil {
128 return nil
129 }
130 s := make([]*NamedAttributeExpr, len(*o))
131 copy(s, *o)
132 sort.Slice(s, func(i, j int) bool { return s[i].Name < s[j].Name })
133 return Object(s)
134}

Callers 1

hashObjectFunction · 0.85

Calls 1

ObjectTypeAlias · 0.85

Tested by

no test coverage detected