Fix gofmt issues

See,
$ gometalinter --disable-all --enable=gofmt --deadline 10m --vendor ./...
build.go:1:⚠️ file is not gofmted with -s (gofmt)
scripts/build/release_publisher/externalrelease.go:1:⚠️ file is not gofmted with -s (gofmt)
scripts/build/release_publisher/localrelease.go:1:⚠️ file is not gofmted with -s (gofmt)
scripts/build/release_publisher/main.go:1:⚠️ file is not gofmted with -s (gofmt)
scripts/build/release_publisher/publisher_test.go:1:⚠️ file is not gofmted with -s (gofmt)
This commit is contained in:
Mario Trangoni 2018-11-12 10:47:27 +01:00
parent 46ebe245ab
commit 8c04926326
5 changed files with 9 additions and 9 deletions

View File

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

View File

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

View File

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

View File

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

View File

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