aboutsummaryrefslogtreecommitdiffhomepage
path: root/releaser
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2020-12-02 13:23:25 +0100
committerBjørn Erik Pedersen <[email protected]>2020-12-03 13:12:58 +0100
commitd90e37e0c6e812f9913bf256c9c81aa05b7a08aa (patch)
tree7b1b14464eefec1188ca2eed53c64e4823453cc9 /releaser
parent32471b57bde51c55a15dbf1db75d6e5f7232c347 (diff)
downloadhugo-d90e37e0c6e812f9913bf256c9c81aa05b7a08aa.tar.gz
hugo-d90e37e0c6e812f9913bf256c9c81aa05b7a08aa.zip
all: Format code with gofumpt
See https://github.com/mvdan/gofumpt
Diffstat (limited to 'releaser')
-rw-r--r--releaser/git.go4
-rw-r--r--releaser/git_test.go2
-rw-r--r--releaser/github.go1
-rw-r--r--releaser/releasenotes_writer.go9
-rw-r--r--releaser/releasenotes_writer_test.go1
5 files changed, 2 insertions, 15 deletions
diff --git a/releaser/git.go b/releaser/git.go
index 19cf072ee..7d2d43e2a 100644
--- a/releaser/git.go
+++ b/releaser/git.go
@@ -85,7 +85,7 @@ func gitInfosToChangeLog(infos, docInfos gitInfos) *changeLog {
for _, info := range infos {
los := strings.ToLower(info.Subject)
isFix := strings.Contains(los, "fix")
- var category = otherChanges
+ category := otherChanges
// TODO(bep) improve
if regexp.MustCompile("(?i)deprecate").MatchString(los) {
@@ -176,7 +176,6 @@ func (c countribCount) AuthorLink() string {
}
return c.Author[:strings.Index(c.Author, "@")]
-
}
type contribCounts []countribCount
@@ -298,7 +297,6 @@ func gitShort(args ...string) (output string, err error) {
func tagExists(tag string) (bool, error) {
out, err := git("tag", "-l", tag)
-
if err != nil {
return false, err
}
diff --git a/releaser/git_test.go b/releaser/git_test.go
index 1c5f78886..21d261a62 100644
--- a/releaser/git_test.go
+++ b/releaser/git_test.go
@@ -45,7 +45,6 @@ See #456
c.Assert(len(issues), qt.Equals, 4)
c.Assert(issues[0], qt.Equals, 123)
c.Assert(issues[2], qt.Equals, 543)
-
}
func TestGitVersionTagBefore(t *testing.T) {
@@ -66,7 +65,6 @@ func TestTagExists(t *testing.T) {
b2, err := tagExists("adfagdsfg")
c.Assert(err, qt.IsNil)
c.Assert(b2, qt.Equals, false)
-
}
func skipIfCI(t *testing.T) {
diff --git a/releaser/github.go b/releaser/github.go
index ba019ccad..4ec722baf 100644
--- a/releaser/github.go
+++ b/releaser/github.go
@@ -112,7 +112,6 @@ func (g *gitHubAPI) fetchRepo() (gitHubRepo, error) {
repo.Contributors = contributors
return repo, err
-
}
func doGitHubRequest(req *http.Request, v interface{}) error {
diff --git a/releaser/releasenotes_writer.go b/releaser/releasenotes_writer.go
index de7bb3d35..1dd910940 100644
--- a/releaser/releasenotes_writer.go
+++ b/releaser/releasenotes_writer.go
@@ -175,7 +175,6 @@ func writeReleaseNotes(version string, infosMain, infosDocs gitInfos, to io.Writ
}
return nil
-
}
func fetchThemeCount() (int, error) {
@@ -235,16 +234,12 @@ func (r *ReleaseHandler) releaseNotesState(version string) (releaseNotesState, e
}
return releaseNotesNone, nil
-
}
func (r *ReleaseHandler) writeReleaseNotesToTemp(version string, isPatch bool, infosMain, infosDocs gitInfos) (string, error) {
-
docsTempPath, name := getReleaseNotesDocsTempDirAndName(version, isPatch)
- var (
- w io.WriteCloser
- )
+ var w io.WriteCloser
if !r.try {
os.Mkdir(docsTempPath, os.ModePerm)
@@ -269,7 +264,6 @@ func (r *ReleaseHandler) writeReleaseNotesToTemp(version string, isPatch bool, i
}
return name, nil
-
}
func (r *ReleaseHandler) writeReleaseNotesToDocs(title, description, sourceFilename string) (string, error) {
@@ -324,5 +318,4 @@ categories: ["Releases"]%s
}
return targetFullFilename, nil
-
}
diff --git a/releaser/releasenotes_writer_test.go b/releaser/releasenotes_writer_test.go
index 5013c6522..bffcb1ccb 100644
--- a/releaser/releasenotes_writer_test.go
+++ b/releaser/releasenotes_writer_test.go
@@ -41,5 +41,4 @@ func _TestReleaseNotesWriter(t *testing.T) {
c.Assert(writeReleaseNotes("0.21", infos, infos, &b), qt.IsNil)
fmt.Println(b.String())
-
}