Skip to content

Fix lint issues from golangci-lint quality checks#44

Merged
andrew merged 1 commit intomainfrom
lint-fixes
Mar 18, 2026
Merged

Fix lint issues from golangci-lint quality checks#44
andrew merged 1 commit intomainfrom
lint-fixes

Conversation

@andrew
Copy link
Copy Markdown
Contributor

@andrew andrew commented Mar 18, 2026

Replace magic numbers with named constants, extract repeated string literals into constants, convert if-else chains to switch statements, replace unnecessary lambdas with direct function references, simplify HasPrefix+TrimPrefix to CutPrefix, mark unused parameters, and reduce cognitive complexity by extracting helper functions.

Resolves all goconst, gocritic, mnd, unparam, and gocognit warnings. The remaining ireturn and dupl warnings are intentional (interface returns are the library's design pattern, and dupl flags similar service implementations).

Replace magic numbers with named constants, extract repeated string
literals into constants, convert if-else chains to switch statements,
replace unnecessary lambdas with direct function references, simplify
HasPrefix+TrimPrefix to CutPrefix, mark unused parameters, and reduce
cognitive complexity by extracting helper functions.
@andrew andrew merged commit dc39ad6 into main Mar 18, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant