diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index 0a3e7c3..3bd66d6 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -30,12 +30,16 @@ jobs: - name: Set PATH run: echo "${GITHUB_WORKSPACE}/.local/bin" >>"${GITHUB_PATH}" + - name: install goimports + if: matrix.go == '1.19.x' && matrix.os == 'ubuntu-latest' + run: GOBIN=${PWD}/.local/bin go install golang.org/x/tools/cmd/goimports@latest + - name: Checkout Code uses: actions/checkout@v3 - - name: GOFMT Check - if: matrix.go == '1.18.x' && matrix.os == 'ubuntu-latest' - run: test -z $(gofmt -l .) + - name: goimports check + if: matrix.go == '1.19.x' && matrix.os == 'ubuntu-latest' + run: test -z $(goimports -l .) - name: vet run: go run internal/build/build.go vet diff --git a/cli.go b/cli.go index c0c5d9a..b3b864c 100644 --- a/cli.go +++ b/cli.go @@ -3,23 +3,23 @@ // cli application can be written as follows: // // func main() { -// (&cli.App{}).Run(os.Args) +// (&cli.App{}).Run(os.Args) // } // // Of course this application does not do much, so let's make this an actual application: // -// func main() { -// app := &cli.App{ -// Name: "greet", -// Usage: "say a greeting", -// Action: func(c *cli.Context) error { -// fmt.Println("Greetings") -// return nil -// }, -// } +// func main() { +// app := &cli.App{ +// Name: "greet", +// Usage: "say a greeting", +// Action: func(c *cli.Context) error { +// fmt.Println("Greetings") +// return nil +// }, +// } // -// app.Run(os.Args) -// } +// app.Run(os.Args) +// } package cli //go:generate go run cmd/urfave-cli-genflags/main.go