Skip to content

Commit

Permalink
ref
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-fbudzynski committed Dec 18, 2024
1 parent a9d50cb commit 57ebbc3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/sdk/poc/generator/show_object_methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,18 @@ func (s *Operation) withShowObjectMethods(structName string, showObjectMethodsKi
case ShowObjectIdMethod:
id, err := identifierStringToObjectIdentifier(s.ObjectInterface.IdentifierKind)
if err != nil {
log.Printf("[WARN]: %v, for showObjectIdMethod", err)
log.Printf("[WARN] for showObjectIdMethod: %v", err)
continue
}
if !hasRequiredFieldsForIDMethod(structName, s.HelperStructs, id) {
log.Printf("[WARN]: Struct '%s' does not contain needed fields to build ID() helper method. Create the method manually in _ext file or add missing fields: %v.\n", structName, idTypeParts[id])
log.Printf("[WARN] struct '%s' does not contain needed fields to build ID() helper method. Create the method manually in _ext file or add missing fields: %v.\n", structName, idTypeParts[id])
continue
}
s.ShowObjectMethods = append(s.ShowObjectMethods, newShowObjectIDMethod(structName, s.HelperStructs, id))
case ShowObjectTypeMethod:
s.ShowObjectMethods = append(s.ShowObjectMethods, newShowObjectTypeMethod(structName))
default:
log.Println("No showObjectMethod found for kind:", methodKind)
log.Println("[WARN] no showObjectMethod found for kind:", methodKind)
}
}
return s
Expand All @@ -60,7 +60,7 @@ func hasRequiredFieldsForIDMethod(structName string, helperStructs []*Field, idT
}
}
}
log.Printf("[WARN]: No required fields mapping defined for identifier %s", idType)
log.Printf("[WARN] no required fields mapping defined for identifier %s", idType)
return false
}

Expand Down

0 comments on commit 57ebbc3

Please sign in to comment.