bump to go 1.20 + fix some code issues

This commit is contained in:
2023-09-09 15:45:36 +02:00
parent c1551be07f
commit 2bc22b637d
6 changed files with 65 additions and 69 deletions
+13 -19
View File
@@ -1,26 +1,20 @@
.DEFAULT_GOAL := build
fmt:
.DEFAULT_GOAL := run
BIN_NAME := mailsrv
ROOT_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
BUILD_DIR := $(ROOT_DIR)builds
build: format lint
@mkdir -p $(BUILD_DIR)
@go build -o $(BUILD_DIR)/$(BIN_NAME) main.go
format:
go fmt ./...
.PHONY:fmt
lint: fmt
golint ./...
.PHONY:lint
vet: fmt
go vet ./...
shadow ./...
.PHONY:vet
build:
go build -o mailsrv
.PHONY:build
build-check: vet
go build -o mailsrv
.PHONY:build
lint:
golangci-lint run --fix
test:
go test ./...
.PHONY:test