Skip to content

Commit

Permalink
Keep TODO comment
Browse files Browse the repository at this point in the history
  • Loading branch information
chansuke committed Oct 21, 2023
1 parent 54b6056 commit aa7984c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/resource/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ func (rf *Factory) Hasher() ifc.KustHasher {
func (rf *Factory) FromMap(m map[string]interface{}) *Resource {
res, err := rf.FromMapAndOption(m, nil)
if err != nil {
// TODO: return err instead of log.
log.Fatalf("failed to create resource from map: %v", err)
}
return res
Expand All @@ -58,6 +59,7 @@ func (rf *Factory) FromMapWithName(n string, m map[string]interface{}) *Resource
func (rf *Factory) FromMapWithNamespaceAndName(ns string, n string, m map[string]interface{}) *Resource {
r, err := rf.FromMapAndOption(m, nil)
if err != nil {
// TODO: return err instead of log.
log.Fatalf("failed to create resource from map: %v", err)
}
return r.setPreviousId(ns, n, r.GetKind())
Expand Down

0 comments on commit aa7984c

Please sign in to comment.