Module structure

This commit is contained in:
Ian Gulliver
2023-06-11 20:32:36 -07:00
parent e3cfe112df
commit d832ab35c7
5 changed files with 69 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
cover.*

46
.golangci.yaml Normal file
View File

@@ -0,0 +1,46 @@
linters:
enable-all: true
disable:
# re-enable when working
- rowserrcheck
- wastedassign
# maybe enable these
- wrapcheck
# leave these disabled
- cyclop
- deadcode
- dupl
- exhaustivestruct
- exhaustruct
- forbidigo
- forcetypeassert
- funlen
- gochecknoglobals
- gocognit
- goconst
- godox
- golint
- gomnd
- ifshort
- interfacer
- lll
- maintidx
- maligned
- nilnil
- nestif
- nlreturn
- nolintlint
- nosnakecase
- scopelint
- structcheck
- thelper
- varcheck
- varnamelen
linters-settings:
tagliatelle:
case:
use-field-name: true
rules:
json: goCamel
wsl:
allow-separated-leading-comment: true

1
event.go Normal file
View File

@@ -0,0 +1 @@
package event

3
go.mod Normal file
View File

@@ -0,0 +1,3 @@
module github.com/gopatchy/event
go 1.20

18
justfile Normal file
View File

@@ -0,0 +1,18 @@
go := env_var_or_default('GOCMD', 'go')
default: tidy test
tidy:
{{go}} mod tidy
goimports -l -w .
gofumpt -l -w .
{{go}} fmt ./...
test:
{{go}} vet ./...
golangci-lint run ./...
{{go}} test -race -coverprofile=cover.out -timeout=60s ./...
{{go}} tool cover -html=cover.out -o=cover.html
todo:
-git grep -e TODO --and --not -e ignoretodo