Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
420792b
docs: update documentation for service package, streamline features a…
MarvinJWendt Jul 11, 2025
1a51b3b
refactor: simplify service start process and update documentation for…
MarvinJWendt Jul 11, 2025
7a5ee9b
docs: update package description and README to clarify library purpos…
MarvinJWendt Jul 11, 2025
43cff31
feat: add comprehensive health check endpoints and integrate health-g…
MarvinJWendt Jul 11, 2025
2279e9f
chore: add lib/pq dependency and remove example main.go file
MarvinJWendt Jul 11, 2025
82419be
fix: update PostgreSQL health check example in README and example code
MarvinJWendt Jul 11, 2025
2c86725
refactor: remove demo main.go and simplify health check examples
MarvinJWendt Jul 11, 2025
96e68cc
fix: correct import alias for PostgreSQL health check in README
MarvinJWendt Jul 11, 2025
8595a97
fix: update health check example in README to improve clarity
MarvinJWendt Jul 11, 2025
c62d828
chore: update golangci-lint configuration
MarvinJWendt Jul 11, 2025
4e64c43
chore: fix whitespaces
MarvinJWendt Jul 11, 2025
23c1f8d
chore: fix most linting issues
MarvinJWendt Jul 11, 2025
41d39c8
chore: rewrote metrics system
MarvinJWendt Jul 11, 2025
38198c0
fix: update metric registration to include service name prefix
MarvinJWendt Jul 12, 2025
6e55952
chore: update go.mod and refactor ensureMetricNamePrefix function
MarvinJWendt Jul 12, 2025
02f0d98
chore: update golangci-lint action version
MarvinJWendt Jul 12, 2025
27c845b
fix: update health check comment in README to reflect PostgreSQL
MarvinJWendt Jul 12, 2025
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
Empty file added .github/atomicgo/custom_readme
Empty file.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ jobs:
go-version: "stable"

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v8
with:
version: latest
233 changes: 120 additions & 113 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,115 +1,122 @@
# ┌───────────────────────────────────────────────────────────────────┐
# │ │
# │ IMPORTANT NOTE │
# │ │
# │ This file is synced with https://github.com/atomicgo/template │
# │ │
# │ Please apply all changes to the template repository │
# │ │
# └───────────────────────────────────────────────────────────────────┘

run:
timeout: 3m

version: "2"
linters:
enable-all: true
default: all
disable:
- copyloopvar # fixed in go 1.22+
- depguard # no forbidden imports
- dogsled # blank identifiers are allowed
- dupword # duplicate words are allowed
- exhaustruct # many structs don't need to be exhaustive
- forbidigo # no forbidden identifiers
- ginkgolinter # not used
- gochecknoinits # init functions are fine, if used carefully
- goconst # many false positives
- godot # comments don't need to be complete sentences
- godox # todo comments are allowed
- goheader # no need for a header
- gomoddirectives # allow all directives
- gomodguard # no forbidden imports
- grouper # unused
- importas # some aliases are fine
- makezero # make with non-zero initial length is fine
- noctx # http request may be sent without context
- nonamedreturns # named returns are fine
- testableexamples # examples do not need to be testable (have declared output)
- testifylint # testify is not recommended
- testpackage # not a go best practice
- unparam # interfaces can enforce parameters
- zerologlint # slog should be used instead of zerolog
- mnd # too many detections
- cyclop # covered by gocyclo
- gochecknoglobals # there are many valid reasons for global variables, depending on the project
- ireturn # there are too many exceptions
- tenv # deprecated

linters-settings:
wsl:
allow-cuddle-declarations: true
force-err-cuddling: true
force-case-trailing-whitespace: 3

funlen:
lines: 100
statements: 50
ignore-comments: true

lll:
line-length: 140
tab-width: 1

nlreturn:
block-size: 2

exhaustive:
check-generated: false
default-signifies-exhaustive: true

varnamelen:
ignore-type-assert-ok: true # ignore "ok" variables
ignore-map-index-ok: true
ignore-chan-recv-ok: true
ignore-decls:
- n int # generic number
- x int # generic number (e.g. coordinate)
- y int # generic number (e.g. coordinate)
- z int # generic number (e.g. coordinate)
- i int # generic number
- a int # generic number
- r int # generic number (e.g. red or radius)
- g int # generic number (e.g. green)
- b int # generic number (e.g. blue)
- r int64 # generic number (e.g. red or radius)
- g int64 # generic number (e.g. green)
- b int64 # generic number (e.g. blue)
- c int # generic number (e.g. count)
- j int # generic number (e.g. index)
- T any # generic type
- a any # generic any (e.g. data)
- b any # generic any (e.g. body)
- c any # generic any
- d any # generic any (e.g. data)
- data any # generic data
- n any # generic any
- ch chan T # common generic channel name
- ch chan int # common generic channel name
- ch chan any # common generic channel name
- wg sync.WaitGroup # common generic WaitGroup name
- t time.Time # often used as a variable name
- f func() # often used as a callback variable name
- f func(T) # often used as a generic callback variable name
- cb func() # often used as a callback variable name
- t testing.T # default testing.T variable name
- b testing.B # default testing.B variable name
- sb strings.Builder # often used as a variable name

issues:
exclude-rules:
- path: "_test(_[^/]+)?\\.go"
linters:
- gochecknoglobals
- noctx
- funlen
- dupl
- errcheck
- copyloopvar
- cyclop
- depguard
- dogsled
- dupword
- exhaustruct
- forbidigo
- ginkgolinter
- gochecknoglobals
- gochecknoinits
- goconst
- godot
- godox
- goheader
- gomoddirectives
- gomodguard
- grouper
- importas
- ireturn
- makezero
- mnd
- noctx
- nonamedreturns
- testableexamples
- testifylint
- testpackage
- unparam
- zerologlint
- noinlineerr
settings:
exhaustive:
default-signifies-exhaustive: true
funlen:
lines: 100
statements: 50
ignore-comments: true
lll:
line-length: 140
tab-width: 1
nlreturn:
block-size: 2
varnamelen:
ignore-type-assert-ok: true
ignore-map-index-ok: true
ignore-chan-recv-ok: true
ignore-decls:
- n int
- x int
- y int
- z int
- i int
- a int
- r int
- g int
- b int
- r int64
- g int64
- b int64
- c int
- j int
- T any
- a any
- b any
- c any
- d any
- data any
- n any
- ch chan T
- ch chan int
- ch chan any
- wg sync.WaitGroup
- t time.Time
- f func()
- f func(T)
- cb func()
- t testing.T
- b testing.B
- sb strings.Builder
- w http.ResponseWriter
- r *http.Request
wsl:
force-case-trailing-whitespace: 3
allow-cuddle-declarations: true
force-err-cuddling: true
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- linters:
- dupl
- errcheck
- funlen
- gochecknoglobals
- noctx
path: _test(_[^/]+)?\.go
- linters:
- revive
text: "unused-parameter:"
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- gci
- gofmt
- gofumpt
- goimports
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
Loading