Skip to content

Commit b4ce9eb

Browse files
committed
lint
1 parent 1d198f1 commit b4ce9eb

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

Makefile

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1-
.PHONY: dev-start dev-stop dev-run
1+
DIR := $(shell pwd)
2+
GO_CI := golangci/golangci-lint:v1.59.1
23

4+
.PHONY: dev-start
35
dev-start:
46
@docker compose -f compose.dev.yml up -d
57

8+
.PHONY: dev-stop
69
dev-stop:
710
@docker compose -f compose.dev.yml down
811

12+
.PHONY: dev-run
913
dev-run:
1014
@go run main.go serve
15+
16+
.PHONY: lint
17+
lint:
18+
@docker run --rm -v $(DIR):/app -w /app $(GO_CI) golangci-lint run -v

cmd/mail.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ func init() {
1818

1919
func mailFunc(_ *cobra.Command, _ []string) {
2020
a, err := app.New()
21-
defer a.Close()
2221
if err != nil {
2322
panic(fmt.Sprintf("%+v\n", err))
2423
}
24+
defer a.Close()
2525
if err = a.Init(); err != nil {
2626
panic(fmt.Sprintf("%+v\n", err))
2727
}

cmd/serve.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ func init() {
1818

1919
func serveFunc(_ *cobra.Command, _ []string) {
2020
a, err := app.New()
21-
defer a.Close()
2221
if err != nil {
2322
panic(fmt.Sprintf("%+v\n", err))
2423
}
24+
defer a.Close()
2525
if err = a.Init(); err != nil {
2626
panic(fmt.Sprintf("%+v\n", err))
2727
}

0 commit comments

Comments
 (0)