Skip to content

Commit

Permalink
fix: go fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
taako-502 committed Nov 23, 2023
1 parent 7dfc180 commit eac6bac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions codegen/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ func (b *builder) buildInterface(typ *ast.Definition) (*Interface, error) {
if interfaceType == nil || err != nil {
return nil, fmt.Errorf("%s is not an interface", i.Type)
}

// Sort so that more specific types are evaluated first.
implementors := b.Schema.GetPossibleTypes(typ)
sort.Slice(implementors, func(i, j int) bool {
return len(implementors[i].Interfaces) > len(implementors[j].Interfaces)
})

for _, implementor := range implementors {
obj, err := b.Binder.DefaultUserObject(implementor.Name)
if err != nil {
Expand Down

0 comments on commit eac6bac

Please sign in to comment.