Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
Signed-off-by: Ashok Pon Kumar <[email protected]>
  • Loading branch information
ashokponkumar committed Sep 18, 2020
1 parent 708e0c0 commit d4590d5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
6 changes: 2 additions & 4 deletions internal/source/cfmanifest2kube.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ func (c CfManifestTranslator) GetServiceOptions(inputPath string, plan plantypes
}
path, _ := plan.GetRelativePath(fullpath)
for _, application := range applications {
containerizationoptionsfound := false
fullbuilddirectory := filepath.Dir(fullpath)
if application.Path != "" {
fullbuilddirectory = filepath.Join(fullpath, application.Path)
Expand All @@ -122,8 +121,8 @@ func (c CfManifestTranslator) GetServiceOptions(inputPath string, plan plantypes
service.UpdateContainerBuildPipeline = false
services = append(services, service)
appsCovered = append(appsCovered, applicationName)
containerizationoptionsfound = true
} else {
containerizationoptionsfound := false
for _, cop := range allcontainerizers.GetContainerizationOptions(plan, fullbuilddirectory) {
service := c.newService(applicationName)
service.ContainerBuildType = cop.ContainerizationType
Expand Down Expand Up @@ -192,7 +191,6 @@ func (c CfManifestTranslator) GetServiceOptions(inputPath string, plan plantypes
for _, application := range apps {
applicationName := application.Name
if !common.IsStringPresent(appsCovered, applicationName) {
containerizationoptionsfound := false
fullbuilddirectory := filepath.Dir(appfilepath)
applicationName := application.Name
if applicationName == "" {
Expand All @@ -207,8 +205,8 @@ func (c CfManifestTranslator) GetServiceOptions(inputPath string, plan plantypes
}
service.UpdateContainerBuildPipeline = false
services = append(services, service)
containerizationoptionsfound = true
} else {
containerizationoptionsfound := false
//TODO: Think whether we should include this for only runtime manifest file
for _, cop := range allcontainerizers.GetContainerizationOptions(plan, fullbuilddirectory) {
service := c.newService(applicationName)
Expand Down
2 changes: 1 addition & 1 deletion internal/transformer/k8stransformer.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func (kt *K8sTransformer) WriteObjects(outpath string) error {

_, err := writeTransformedObjects(artifactspath, objs)
if err != nil {
log.Errorf("Error occured while writing transformed objects %s", err)
log.Errorf("Error occurred while writing transformed objects %s", err)
}
if kt.Helm {
_ = kt.createOperator(kt.Name, outpath)
Expand Down
2 changes: 1 addition & 1 deletion internal/transformer/knativetransformer.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func (kt *KnativeTransformer) WriteObjects(outpath string) error {

_, err := writeTransformedObjects(artifactspath, kt.TransformedObjects)
if err != nil {
log.Errorf("Error occured while writing transformed objects %s", err)
log.Errorf("Error occurred while writing transformed objects %s", err)
}
kt.writeDeployScript(kt.Name, outpath)
kt.writeReadeMe(kt.Name, areNewImagesCreated, outpath)
Expand Down
2 changes: 1 addition & 1 deletion types/output/helmvaluesoutput.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const (
ServicesTag string = "services"
// ImageTagTag is the tag name for images
ImageTagTag string = "imagetag"
// ContainersTag is the tag name for conatiners
// ContainersTag is the tag name for containers
ContainersTag string = "containers"
)

Expand Down

0 comments on commit d4590d5

Please sign in to comment.