From 8c04926326cd7cc59695fafc0a318c85cf8b8a6c Mon Sep 17 00:00:00 2001 From: Mario Trangoni Date: Mon, 12 Nov 2018 10:47:27 +0100 Subject: [PATCH] Fix gofmt issues See, $ gometalinter --disable-all --enable=gofmt --deadline 10m --vendor ./... build.go:1::warning: file is not gofmted with -s (gofmt) scripts/build/release_publisher/externalrelease.go:1::warning: file is not gofmted with -s (gofmt) scripts/build/release_publisher/localrelease.go:1::warning: file is not gofmted with -s (gofmt) scripts/build/release_publisher/main.go:1::warning: file is not gofmted with -s (gofmt) scripts/build/release_publisher/publisher_test.go:1::warning: file is not gofmted with -s (gofmt) --- build.go | 2 +- scripts/build/release_publisher/externalrelease.go | 4 ++-- scripts/build/release_publisher/localrelease.go | 4 ++-- scripts/build/release_publisher/main.go | 6 +++--- scripts/build/release_publisher/publisher_test.go | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/build.go b/build.go index a2a1fb825d9..dc789670f62 100644 --- a/build.go +++ b/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] diff --git a/scripts/build/release_publisher/externalrelease.go b/scripts/build/release_publisher/externalrelease.go index 327fb335dbe..181dd4088ad 100644 --- a/scripts/build/release_publisher/externalrelease.go +++ b/scripts/build/release_publisher/externalrelease.go @@ -9,8 +9,8 @@ import ( ) type releaseFromExternalContent struct { - getter urlGetter - rawVersion string + getter urlGetter + rawVersion string artifactConfigurations []buildArtifact } diff --git a/scripts/build/release_publisher/localrelease.go b/scripts/build/release_publisher/localrelease.go index 7c0a3b1d085..0bbecff9327 100644 --- a/scripts/build/release_publisher/localrelease.go +++ b/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 { diff --git a/scripts/build/release_publisher/main.go b/scripts/build/release_publisher/main.go index c4004fe7b4c..27430d4cb64 100644 --- a/scripts/build/release_publisher/main.go +++ b/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, } } diff --git a/scripts/build/release_publisher/publisher_test.go b/scripts/build/release_publisher/publisher_test.go index 22b2bc3a5ba..76a1446406a 100644 --- a/scripts/build/release_publisher/publisher_test.go +++ b/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, }