mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-07-15 11:57:59 +00:00
feat: upgrade Go version and improve build system
- Upgrade Go version from 1.22 to 1.24 for better performance and security - Add comprehensive golangci-lint configuration with: - Enable additional linters: bodyclose, dupl, exportloopref, gocognit, gocritic, gosec, prealloc - Configure complexity thresholds (cyclomatic: 15, cognitive: 20) - Set up security scanning with gosec - Add code quality rules with revive - Exclude test files from certain strict checks - Update dependencies to latest stable versions: - aws-sdk-go-v2: various components updated - Azure SDK: updated to v1.18.0 for azcore - etcd client: remains at v3.6.1 for stability - prometheus client: updated to v1.22.0 - zerolog: updated to v1.34.0 - Enhance logging utilities: - Add GetLogLevelOrDebug function for flexible log level configuration - Support "warning" as alias for "warn" level - Improve error handling for invalid log levels These changes improve code quality checks, leverage latest Go features, and ensure dependencies are up-to-date with security patches.
This commit is contained in:
@@ -46,6 +46,10 @@ func SetupDefaultLogger(levelStr string) {
|
||||
}
|
||||
|
||||
func GetLogLevelOrDebug(levelStr string) zerolog.Level {
|
||||
if levelStr == "" {
|
||||
return zerolog.DebugLevel
|
||||
}
|
||||
|
||||
levelStr = strings.ToLower(levelStr)
|
||||
if levelStr == "warning" {
|
||||
levelStr = "warn"
|
||||
|
||||
Reference in New Issue
Block a user