From c607cdae9437f3e7eb1cd86dd1d1024abc2c21b9 Mon Sep 17 00:00:00 2001 From: Jan Dittberner Date: Sun, 12 May 2024 10:20:06 +0200 Subject: [PATCH] Update linter, remove copyright years Git has all history information, copyright years don't provide useful additional information. --- .golangci.yml | 4 ++-- cmd/app/main.go | 2 +- internal/handlers/after_logout.go | 2 +- internal/handlers/common.go | 2 +- internal/handlers/errors.go | 2 +- internal/handlers/index.go | 2 +- internal/handlers/login.go | 2 +- internal/handlers/observability.go | 4 ++-- internal/handlers/oidc_callback.go | 2 +- internal/handlers/protected.go | 2 +- internal/handlers/security.go | 2 +- internal/handlers/startup.go | 2 +- internal/models/oidc.go | 2 +- internal/services/configuration.go | 2 +- internal/services/i18n.go | 2 +- internal/services/oidc.go | 2 +- internal/services/security.go | 2 +- internal/services/session.go | 4 ++-- internal/services/token.go | 2 +- translations/translations.go | 2 +- ui/ui.go | 2 +- 21 files changed, 24 insertions(+), 24 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index a62dbd4..af5e836 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -8,7 +8,7 @@ linters-settings: const: ORGANIZATION: CAcert Inc. template: |- - Copyright {{ YEAR-RANGE }} {{ ORGANIZATION }} + Copyright {{ ORGANIZATION }} SPDX-License-Identifier: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); @@ -47,7 +47,7 @@ linters: - gofmt - goheader - goimports - - gomnd + - mnd - gosec - lll - makezero diff --git a/cmd/app/main.go b/cmd/app/main.go index 6a3e7b6..69b45af 100644 --- a/cmd/app/main.go +++ b/cmd/app/main.go @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 CAcert Inc. +Copyright CAcert Inc SPDX-License-Identifier: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/internal/handlers/after_logout.go b/internal/handlers/after_logout.go index d9dfc77..7690019 100644 --- a/internal/handlers/after_logout.go +++ b/internal/handlers/after_logout.go @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 CAcert Inc. +Copyright CAcert Inc. SPDX-License-Identifier: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/internal/handlers/common.go b/internal/handlers/common.go index 01924e9..87d642a 100644 --- a/internal/handlers/common.go +++ b/internal/handlers/common.go @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 CAcert Inc. +Copyright CAcert Inc. SPDX-License-Identifier: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/internal/handlers/errors.go b/internal/handlers/errors.go index 16ed186..20a3fba 100644 --- a/internal/handlers/errors.go +++ b/internal/handlers/errors.go @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 CAcert Inc. +Copyright CAcert Inc. SPDX-License-Identifier: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/internal/handlers/index.go b/internal/handlers/index.go index 381b888..fbddaa0 100644 --- a/internal/handlers/index.go +++ b/internal/handlers/index.go @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 CAcert Inc. +Copyright CAcert Inc. SPDX-License-Identifier: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/internal/handlers/login.go b/internal/handlers/login.go index a9f9064..f748814 100644 --- a/internal/handlers/login.go +++ b/internal/handlers/login.go @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 CAcert Inc. +Copyright CAcert Inc. SPDX-License-Identifier: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/internal/handlers/observability.go b/internal/handlers/observability.go index e140576..88180f8 100644 --- a/internal/handlers/observability.go +++ b/internal/handlers/observability.go @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 CAcert Inc. +Copyright CAcert Inc. SPDX-License-Identifier: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); @@ -97,7 +97,7 @@ func Tracing(nextRequestID func() string) func(http.Handler) http.Handler { var Healthy int32 func NewHealthHandler() http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + return http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { if atomic.LoadInt32(&Healthy) == 1 { w.WriteHeader(http.StatusNoContent) diff --git a/internal/handlers/oidc_callback.go b/internal/handlers/oidc_callback.go index f89716a..9c6ada8 100644 --- a/internal/handlers/oidc_callback.go +++ b/internal/handlers/oidc_callback.go @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 CAcert Inc. +Copyright CAcert Inc. SPDX-License-Identifier: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/internal/handlers/protected.go b/internal/handlers/protected.go index 401b230..1a162bb 100644 --- a/internal/handlers/protected.go +++ b/internal/handlers/protected.go @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 CAcert Inc. +Copyright CAcert Inc. SPDX-License-Identifier: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/internal/handlers/security.go b/internal/handlers/security.go index c7cd078..e5b9828 100644 --- a/internal/handlers/security.go +++ b/internal/handlers/security.go @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 CAcert Inc. +Copyright CAcert Inc. SPDX-License-Identifier: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/internal/handlers/startup.go b/internal/handlers/startup.go index 3497a45..dcdb8d2 100644 --- a/internal/handlers/startup.go +++ b/internal/handlers/startup.go @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 CAcert Inc. +Copyright CAcert Inc. SPDX-License-Identifier: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/internal/models/oidc.go b/internal/models/oidc.go index 582ff3a..771b058 100644 --- a/internal/models/oidc.go +++ b/internal/models/oidc.go @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 CAcert Inc. +Copyright CAcert Inc. SPDX-License-Identifier: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/internal/services/configuration.go b/internal/services/configuration.go index db40021..f2836bb 100644 --- a/internal/services/configuration.go +++ b/internal/services/configuration.go @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 CAcert Inc. +Copyright CAcert Inc. SPDX-License-Identifier: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/internal/services/i18n.go b/internal/services/i18n.go index ea48635..2957585 100644 --- a/internal/services/i18n.go +++ b/internal/services/i18n.go @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 CAcert Inc. +Copyright CAcert Inc. SPDX-License-Identifier: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/internal/services/oidc.go b/internal/services/oidc.go index 6f72d89..a949786 100644 --- a/internal/services/oidc.go +++ b/internal/services/oidc.go @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 CAcert Inc. +Copyright CAcert Inc. SPDX-License-Identifier: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/internal/services/security.go b/internal/services/security.go index 3628b14..ad0fd6d 100644 --- a/internal/services/security.go +++ b/internal/services/security.go @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 CAcert Inc. +Copyright CAcert Inc. SPDX-License-Identifier: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/internal/services/session.go b/internal/services/session.go index a07947a..8bc307f 100644 --- a/internal/services/session.go +++ b/internal/services/session.go @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 CAcert Inc. +Copyright CAcert Inc. SPDX-License-Identifier: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); @@ -38,7 +38,7 @@ func InitSessionStore(logger *log.Logger, sessionPath string, keys ...[]byte) { if _, err := os.Stat(sessionPath); err != nil { if os.IsNotExist(err) { - if err = os.MkdirAll(sessionPath, 0700); err != nil { //nolint:gomnd + if err = os.MkdirAll(sessionPath, 0700); err != nil { //nolint:mnd logger.WithError(err).Fatal("could not create session store director") } } diff --git a/internal/services/token.go b/internal/services/token.go index ff1ad4c..afd20db 100644 --- a/internal/services/token.go +++ b/internal/services/token.go @@ -1,5 +1,5 @@ /* -Copyright 2023 CAcert Inc. +Copyright CAcert Inc. SPDX-License-Identifier: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/translations/translations.go b/translations/translations.go index 99f0e22..6f254d9 100644 --- a/translations/translations.go +++ b/translations/translations.go @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 CAcert Inc. +Copyright CAcert Inc. SPDX-License-Identifier: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/ui/ui.go b/ui/ui.go index 1ec2a66..6e03076 100644 --- a/ui/ui.go +++ b/ui/ui.go @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 CAcert Inc. +Copyright CAcert Inc. SPDX-License-Identifier: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License");