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 go mod tidy
test: test:
@ -22,5 +22,11 @@ coverage-html: coverage
lint: lint:
golangci-lint run ./... 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: build:
go build -o changeloguru-dev ./cmd/changeloguru go build -o changeloguru-dev ./cmd/changeloguru

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -9,16 +9,18 @@ import (
"strings" "strings"
"time" "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"
"github.com/pkg/diff/write" "github.com/pkg/diff/write"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
"golang.org/x/mod/semver" "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" const autoCommitMessageTemplate = "chore(changelog): generate %s"

View File

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

View File

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

View File

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