From 57e54b79d5f233dd52e3360a1e61e21789a74fa3 Mon Sep 17 00:00:00 2001 From: Hau Nguyen Date: Sat, 25 Feb 2023 23:14:43 +0700 Subject: [PATCH] chore: format file --- Makefile | 17 +++++++++++++++++ internal/cli/action_run.go | 3 ++- internal/cli/app.go | 3 ++- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index f97f0a3..ffaf8f2 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,9 @@ all: $(MAKE) test-color $(MAKE) lint + $(MAKE) format + $(MAKE) build + $(MAKE) clean go mod tidy test-color: @@ -11,3 +14,17 @@ test-color: lint: golangci-lint run ./... + +format: + go install github.com/haunt98/gofimports/cmd/gofimports@latest + go install mvdan.cc/gofumpt@latest + go install mvdan.cc/sh/v3/cmd/shfmt@latest + gofimports -w --company github.com/make-go-great,github.com/haunt98 . + gofumpt -w -extra . + +build: + $(MAKE) clean + go build ./cmd/update-go-mod + +clean: + rm -rf update-go-mod diff --git a/internal/cli/action_run.go b/internal/cli/action_run.go index 56ade78..ae352bd 100644 --- a/internal/cli/action_run.go +++ b/internal/cli/action_run.go @@ -11,8 +11,9 @@ import ( "os/exec" "strings" - "github.com/make-go-great/color-go" "github.com/urfave/cli/v2" + + "github.com/make-go-great/color-go" ) const ( diff --git a/internal/cli/app.go b/internal/cli/app.go index 39816b3..2f561d2 100644 --- a/internal/cli/app.go +++ b/internal/cli/app.go @@ -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 (