chore: format this project using this project :)

main
sudo pacman -Syu 2022-11-28 01:11:04 +07:00
parent d5d0bfc7ea
commit 07458099e9
No known key found for this signature in database
GPG Key ID: D6CB5C6C567C47B0
4 changed files with 22 additions and 3 deletions

View File

@ -23,8 +23,10 @@ lint:
golangci-lint run ./...
format:
go install github.com/haunt98/gofimports/cmd/gofimports@latest
go install mvdan.cc/gofumpt@latest
gofumpt -l -w -extra .
gofimports -w -company github.com/make-go-great .
gofumpt -w -extra .
build:
go build ./cmd/gofimports

View File

@ -28,6 +28,21 @@ go install github.com/haunt98/gofimports/cmd/gofimports@latest
gofimports -l -company github.com/make-go-great -w -d ./internal
```
Example result:
```go
import (
"fmt"
"github.com/urfave/cli/v2"
"github.com/pkg/diff"
"github.com/make-go-great/color-go"
"github.com/haunt98/gofimports/internal/imports"
)
```
## Roadmap
- [ ] Diff with color

View File

@ -3,8 +3,9 @@ package cli
import (
"fmt"
"github.com/haunt98/gofimports/internal/imports"
"github.com/urfave/cli/v2"
"github.com/haunt98/gofimports/internal/imports"
)
type action struct {

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 (