Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,21 @@ name: tests
on: push

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22.x
cache: true
- name: Lint
uses: golangci/golangci-lint-action@v8
with:
version: v2.1

test-action:
runs-on: ubuntu-latest
steps:
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ run:
go build -o $(BINARY_NAME) ./cmd
./$(BINARY_NAM)

lint:
golangci-lint run

clean:
go clean
rm ${BINARY_NAME}
4 changes: 0 additions & 4 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ import (
"github.com/rs/zerolog/log"
)

func toPtrBool(b bool) *bool {
return &b
}

var CLI struct {
LogLevel string `help:"Set the log level." enum:"trace,debug,info,warn,error" default:"info"`
LogFormat string `enum:"json,text" default:"text" help:"Set the log format. (json, text)"`
Expand Down