Skip to content

Commit

Permalink
fix lint issue
Browse files Browse the repository at this point in the history
Signed-off-by: ashish <ashishjaitiwari15112000@gmail.com>
  • Loading branch information
Revolyssup committed Jan 14, 2022
1 parent 5482e0f commit da0aa19
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions adapter/oam.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ type StaticCompConfig struct {
Path string //Where to store the directory.(Each directory will have an array of definitions and schemas)
DirName string //The directory's name. By convention, it should be the version name
Config manifests.Config //Filters required to create definition and schema
Force bool //When set to true, if the file with same name already exists, they will be overriden
Force bool //When set to true, if the file with same name already exists, they will be overridden
}

//CreateComponents generates components for a given configuration and stores them.
Expand All @@ -195,7 +195,10 @@ func CreateComponents(scfg StaticCompConfig) error {
case HelmCHARTS:
comp, err = manifests.GetFromHelm(scfg.URL, manifests.SERVICE_MESH, scfg.Config)
default:
return err
return ErrCreatingComponents(errors.New("invalid generation method. Must be either Manifests or HelmCharts"))
}
if err != nil {
return ErrCreatingComponents(err)
}
if comp == nil {
return ErrCreatingComponents(errors.New("nil components"))
Expand Down

0 comments on commit da0aa19

Please sign in to comment.