Skip to content

Commit

Permalink
chore: fix linting issue #148
Browse files Browse the repository at this point in the history
  • Loading branch information
srinandan committed Nov 15, 2023
1 parent e81c528 commit 42da061
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions cmd/integrations/scaffold.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ var ScaffoldCmd = &cobra.Command{
return apiclient.SetProjectID(cmdProject.Value.String())
},
RunE: func(cmd *cobra.Command, args []string) (err error) {
const jsonExt = ".json"
var integrationBody, overridesBody []byte
version := cmd.Flag("ver").Value.String()
name := cmd.Flag("name").Value.String()
Expand Down Expand Up @@ -106,7 +107,7 @@ var ScaffoldCmd = &cobra.Command{
}

if err = apiclient.WriteByteArrayToFile(
path.Join(folder, "src", name+".json"),
path.Join(folder, "src", name+jsonExt),
false,
integrationBody); err != nil {
return err
Expand Down Expand Up @@ -151,7 +152,7 @@ var ScaffoldCmd = &cobra.Command{
return err
}
if err = apiclient.WriteByteArrayToFile(
path.Join(folder, "authconfigs", authConfigName+".json"),
path.Join(folder, "authconfigs", authConfigName+jsonExt),
false,
authConfigResp); err != nil {
return err
Expand Down Expand Up @@ -180,7 +181,7 @@ var ScaffoldCmd = &cobra.Command{
return err
}
if err = apiclient.WriteByteArrayToFile(
path.Join(folder, "connectors", connector.Name+".json"),
path.Join(folder, "connectors", connector.Name+jsonExt),
false,
connectionResp); err != nil {
return err
Expand Down Expand Up @@ -213,14 +214,14 @@ var ScaffoldCmd = &cobra.Command{
channelName := getName([]byte(channel))
clilog.Info.Printf("Storing sfdcinstance %s\n", instanceName)
if err = apiclient.WriteByteArrayToFile(
path.Join(folder, "sfdcinstances", instanceName+".json"),
path.Join(folder, "sfdcinstances", instanceName+jsonExt),
false,
instanceBytes); err != nil {
return err
}
clilog.Info.Printf("Storing sfdcchannel %s\n", channelName)
if err = apiclient.WriteByteArrayToFile(
path.Join(folder, "sfdcchannels", instanceName+"_"+channelName+".json"),
path.Join(folder, "sfdcchannels", instanceName+"_"+channelName+jsonExt),
false,
channelBytes); err != nil {
return err
Expand Down

0 comments on commit 42da061

Please sign in to comment.