Browse Source

Merge pull request #14021 from mjtrangoni/fix-gofmt-issues

Fix gofmt issues
Carl Bergquist 7 years ago
parent
commit
fdbea75775

+ 1 - 1
.circleci/config.yml

@@ -91,7 +91,7 @@ jobs:
       - run: 'go get -u github.com/opennota/check/cmd/varcheck'
       - run:
           name: run linters
-          command: 'gometalinter --enable-gc --vendor --deadline 10m --disable-all --enable=deadcode --enable=goconst --enable=ineffassign --enable=megacheck --enable=structcheck --enable=unconvert --enable=varcheck ./...'
+          command: 'gometalinter --enable-gc --vendor --deadline 10m --disable-all --enable=deadcode --enable=goconst --enable=gofmt --enable=ineffassign --enable=megacheck --enable=structcheck --enable=unconvert --enable=varcheck ./...'
       - run:
           name: run go vet
           command: 'go vet ./pkg/...'

+ 1 - 1
build.go

@@ -639,7 +639,7 @@ func shaFile(file string) error {
 
 func shortenBuildId(buildId string) string {
 	buildId = strings.Replace(buildId, "-", "", -1)
-	if (len(buildId) < 9) {
+	if len(buildId) < 9 {
 		return buildId
 	}
 	return buildId[0:8]

+ 2 - 2
scripts/build/release_publisher/externalrelease.go

@@ -9,8 +9,8 @@ import (
 )
 
 type releaseFromExternalContent struct {
-	getter     urlGetter
-	rawVersion string
+	getter                 urlGetter
+	rawVersion             string
 	artifactConfigurations []buildArtifact
 }
 

+ 2 - 2
scripts/build/release_publisher/localrelease.go

@@ -13,7 +13,7 @@ import (
 )
 
 type releaseLocalSources struct {
-	path string
+	path                   string
 	artifactConfigurations []buildArtifact
 }
 
@@ -36,7 +36,7 @@ func (r releaseLocalSources) prepareRelease(baseArchiveUrl, whatsNewUrl string,
 
 type buildData struct {
 	version string
-	builds []build
+	builds  []build
 }
 
 func (r releaseLocalSources) findBuilds(baseArchiveUrl string) buildData {

+ 3 - 3
scripts/build/release_publisher/main.go

@@ -44,13 +44,13 @@ func main() {
 	if fromLocal {
 		path, _ := os.Getwd()
 		builder = releaseLocalSources{
-			path: path,
+			path:                   path,
 			artifactConfigurations: buildArtifactConfigurations,
 		}
 	} else {
 		builder = releaseFromExternalContent{
-			getter:     getHttpContents{},
-			rawVersion: version,
+			getter:                 getHttpContents{},
+			rawVersion:             version,
 			artifactConfigurations: buildArtifactConfigurations,
 		}
 	}

+ 1 - 1
scripts/build/release_publisher/publisher_test.go

@@ -60,7 +60,7 @@ func TestPreparingReleaseFromLocal(t *testing.T) {
 	var builder releaseBuilder
 	testDataPath := "testdata"
 	builder = releaseLocalSources{
-		path: testDataPath,
+		path:                   testDataPath,
 		artifactConfigurations: buildArtifactConfigurations,
 	}