File tree 3 files changed +11
-3
lines changed
3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 1
- .PHONY : dev-start dev-stop dev-run
1
+ DIR := $(shell pwd)
2
+ GO_CI := golangci/golangci-lint:v1.59.1
2
3
4
+ .PHONY : dev-start
3
5
dev-start :
4
6
@docker compose -f compose.dev.yml up -d
5
7
8
+ .PHONY : dev-stop
6
9
dev-stop :
7
10
@docker compose -f compose.dev.yml down
8
11
12
+ .PHONY : dev-run
9
13
dev-run :
10
14
@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
Original file line number Diff line number Diff line change @@ -18,10 +18,10 @@ func init() {
18
18
19
19
func mailFunc (_ * cobra.Command , _ []string ) {
20
20
a , err := app .New ()
21
- defer a .Close ()
22
21
if err != nil {
23
22
panic (fmt .Sprintf ("%+v\n " , err ))
24
23
}
24
+ defer a .Close ()
25
25
if err = a .Init (); err != nil {
26
26
panic (fmt .Sprintf ("%+v\n " , err ))
27
27
}
Original file line number Diff line number Diff line change @@ -18,10 +18,10 @@ func init() {
18
18
19
19
func serveFunc (_ * cobra.Command , _ []string ) {
20
20
a , err := app .New ()
21
- defer a .Close ()
22
21
if err != nil {
23
22
panic (fmt .Sprintf ("%+v\n " , err ))
24
23
}
24
+ defer a .Close ()
25
25
if err = a .Init (); err != nil {
26
26
panic (fmt .Sprintf ("%+v\n " , err ))
27
27
}
You can’t perform that action at this time.
0 commit comments