chore: format using gofimports

main
sudo pacman -Syu 2022-11-28 01:28:59 +07:00
parent e7feb0ccf9
commit fca04f788b
No known key found for this signature in database
GPG Key ID: D6CB5C6C567C47B0
10 changed files with 36 additions and 18 deletions

View File

@ -1,6 +1,6 @@
.PHONY: all test test-color coverage coverage-cli coverate-html lint build
.PHONY: all test test-color coverage coverage-cli coverate-html lint format build
all: test-color lint
all: test-color lint format
go mod tidy
test:
@ -22,5 +22,11 @@ coverage-html: coverage
lint:
golangci-lint run ./...
format:
go install github.com/haunt98/gofimports/cmd/gofimports@latest
go install mvdan.cc/gofumpt@latest
gofimports -w -company github.com/make-go-great .
gofumpt -w -extra .
build:
go build -o changeloguru-dev ./cmd/changeloguru

View File

@ -3,8 +3,9 @@ package changelog
import (
"testing"
"github.com/haunt98/changeloguru/internal/convention"
"github.com/stretchr/testify/assert"
"github.com/haunt98/changeloguru/internal/convention"
)
func TestFilter(t *testing.T) {

View File

@ -4,8 +4,9 @@ import (
"strings"
"time"
"github.com/haunt98/changeloguru/internal/convention"
"github.com/make-go-great/markdown-go"
"github.com/haunt98/changeloguru/internal/convention"
)
const (

View File

@ -4,9 +4,11 @@ import (
"testing"
"time"
"github.com/haunt98/changeloguru/internal/convention"
"github.com/make-go-great/markdown-go"
"github.com/sebdah/goldie/v2"
"github.com/make-go-great/markdown-go"
"github.com/haunt98/changeloguru/internal/convention"
)
func TestGenerateMarkdown(t *testing.T) {

View File

@ -4,8 +4,9 @@ import (
"strings"
"time"
"github.com/haunt98/changeloguru/internal/convention"
"github.com/make-go-great/rst-go"
"github.com/haunt98/changeloguru/internal/convention"
)
// GenerateRST base on GenerateMarkdown

View File

@ -4,9 +4,11 @@ import (
"testing"
"time"
"github.com/haunt98/changeloguru/internal/convention"
"github.com/make-go-great/rst-go"
"github.com/sebdah/goldie/v2"
"github.com/make-go-great/rst-go"
"github.com/haunt98/changeloguru/internal/convention"
)
func TestGenerateRST(t *testing.T) {

View File

@ -9,16 +9,18 @@ import (
"strings"
"time"
"github.com/haunt98/changeloguru/internal/changelog"
"github.com/haunt98/changeloguru/internal/convention"
"github.com/haunt98/changeloguru/internal/git"
"github.com/make-go-great/ioe-go"
"github.com/make-go-great/markdown-go"
"github.com/make-go-great/rst-go"
"github.com/pkg/diff"
"github.com/pkg/diff/write"
"github.com/urfave/cli/v2"
"golang.org/x/mod/semver"
"github.com/make-go-great/ioe-go"
"github.com/make-go-great/markdown-go"
"github.com/make-go-great/rst-go"
"github.com/haunt98/changeloguru/internal/changelog"
"github.com/haunt98/changeloguru/internal/convention"
"github.com/haunt98/changeloguru/internal/git"
)
const autoCommitMessageTemplate = "chore(changelog): generate %s"

View File

@ -3,8 +3,9 @@ package cli
import (
"os"
"github.com/make-go-great/color-go"
"github.com/urfave/cli/v2"
"github.com/make-go-great/color-go"
)
const (

View File

@ -4,9 +4,10 @@ import (
"testing"
"time"
"github.com/haunt98/changeloguru/internal/git"
"github.com/sebdah/goldie/v2"
"github.com/stretchr/testify/assert"
"github.com/haunt98/changeloguru/internal/git"
)
func TestNewCommit(t *testing.T) {

View File

@ -7,8 +7,9 @@ import (
"strings"
"time"
"github.com/haunt98/changeloguru/internal/git"
"github.com/make-go-great/date-go"
"github.com/haunt98/changeloguru/internal/git"
)
const (