Skip to content

Commit

Permalink
chore: fix more linting issues #321
Browse files Browse the repository at this point in the history
  • Loading branch information
srinandan committed Oct 20, 2023
1 parent 2655690 commit b1ebcdf
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 11 deletions.
2 changes: 2 additions & 0 deletions cmd/apis/apis.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ var (
conn, revision int
)

const zipExt = ".zip"

func init() {
Cmd.PersistentFlags().StringVarP(&org, "org", "o",
"", "Apigee organization name")
Expand Down
2 changes: 1 addition & 1 deletion cmd/apis/bundlecrtapis.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ var BundleCreateCmd = &cobra.Command{
}
defer os.RemoveAll(tmpDir)

proxyBundlePath := path.Join(tmpDir, name+".zip")
proxyBundlePath := path.Join(tmpDir, name+zipExt)

if err = proxybundle.GenerateArchiveBundle(proxyFolder, proxyBundlePath, false); err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion cmd/apis/cloneapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ var CloneCmd = &cobra.Command{
return err
}

proxyBundlePath := path.Join(tmpDir, name+".zip")
proxyBundlePath := path.Join(tmpDir, name+zipExt)

if err = proxybundle.GenerateArchiveBundle(path.Join(tmpDir, "apiproxy"), proxyBundlePath, false); err != nil {
return err
Expand Down
3 changes: 1 addition & 2 deletions cmd/apis/depapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,10 @@ var DepCmd = &cobra.Command{
return true
} else if respMap["state"] == "READY" {
clilog.Info.Println("Proxy deployment completed with status: ", respMap["state"])
return false
} else {
clilog.Info.Println("Proxy deployment failed with status: ", respMap["state"])
return false
}
return false
})

<-stop
Expand Down
2 changes: 1 addition & 1 deletion cmd/apis/gqlcrtapis.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ var GqlCreateCmd = &cobra.Command{
}

if importProxy {
_, err = apis.CreateProxy(name, name+".zip")
_, err = apis.CreateProxy(name, name+zipExt)
}

return err
Expand Down
2 changes: 1 addition & 1 deletion cmd/apis/oascrtapis.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ var OasCreateCmd = &cobra.Command{
}

if importProxy {
_, err = apis.CreateProxy(name, name+".zip")
_, err = apis.CreateProxy(name, name+zipExt)
}

return err
Expand Down
2 changes: 1 addition & 1 deletion cmd/apis/swaggerapis.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ var SwaggerCreateCmd = &cobra.Command{
addCORS)

if importProxy {
_, err = apis.CreateProxy(name, name+".zip")
_, err = apis.CreateProxy(name, name+zipExt)
}

return err
Expand Down
3 changes: 1 addition & 2 deletions cmd/env/crtarchive.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,10 @@ var CreateArchiveCmd = &cobra.Command{
} else {
clilog.Info.Printf("Archive deployment failed with status: %s", respMap.Error.Message)
}
return false
} else {
clilog.Info.Printf("Unknown state %s", respMap.Metadata.State)
return false
}
return false
})

<-stop
Expand Down
3 changes: 1 addition & 2 deletions cmd/sharedflows/depsf.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,10 @@ var DepCmd = &cobra.Command{
return true
} else if respMap["state"] == "READY" {
clilog.Info.Println("Sharedflow deployment completed with status: ", respMap["state"])
return false
} else {
clilog.Info.Println("Sharedflow deployment failed with status: ", respMap["state"])
return false
}
return false
})

<-stop
Expand Down

0 comments on commit b1ebcdf

Please sign in to comment.