Skip to content

Commit

Permalink
Merge branch 'main' into feature/search-command
Browse files Browse the repository at this point in the history
  • Loading branch information
NiclasvanEyk committed Jul 1, 2023
2 parents be5572a + 18fbee5 commit 585aaaa
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 15 deletions.
2 changes: 1 addition & 1 deletion cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
`

err = os.WriteFile(changelogPath, []byte(changelogContents), 0774)
err = os.WriteFile(changelogPath, []byte(changelogContents), 0o774)
if err != nil {
return err
}
Expand Down
16 changes: 9 additions & 7 deletions cmd/insert.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ import (
"github.com/spf13/cobra"
)

var changeTypeAdded bool
var changeTypeChanged bool
var changeTypeDeprecated bool
var changeTypeRemoved bool
var changeTypeFixed bool
var changeTypeSecurity bool
var (
changeTypeAdded bool
changeTypeChanged bool
changeTypeDeprecated bool
changeTypeRemoved bool
changeTypeFixed bool
changeTypeSecurity bool
)

// insertCmd represents the insert command
var insertCmd = &cobra.Command{
Expand Down Expand Up @@ -67,7 +69,7 @@ var insertCmd = &cobra.Command{
response = normalized(response)

newSource := changelog.AddItem(changeType, response)
return os.WriteFile(filename, []byte(newSource), 0774)
return os.WriteFile(filename, []byte(newSource), 0o774)
},
}

Expand Down
10 changes: 6 additions & 4 deletions cmd/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ import (
"github.com/spf13/cobra"
)

var isMajor bool
var isMinor bool
var isPatch bool
var (
isMajor bool
isMinor bool
isPatch bool
)

// releaseCmd represents the release command
var releaseCmd = &cobra.Command{
Expand Down Expand Up @@ -59,7 +61,7 @@ to quickly create a Cobra application.`,
bounds := nextRelease.HeadlineBounds
newSource := changelog.ReplacedWithinBounds(bounds, newHeadline)

err = os.WriteFile(changelogPath, []byte(newSource), 0774)
err = os.WriteFile(changelogPath, []byte(newSource), 0o774)
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/yank.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ var yankCmd = &cobra.Command{
return err
}

err = os.WriteFile(changelogPath, []byte(newSource), 0774)
err = os.WriteFile(changelogPath, []byte(newSource), 0o774)
if err != nil {
return err
}
Expand Down
4 changes: 2 additions & 2 deletions internal/changelog/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ func Parse(source []byte) Changelog {
parser := goldmark.DefaultParser()
root := parser.Parse(reader)

var releases = make([]Release, 0)
releases := make([]Release, 0)

var title = ""
title := ""
var currentRelease *Release
currentReleaseIsNextRelease := false
var nextRelease *NextRelease
Expand Down

0 comments on commit 585aaaa

Please sign in to comment.