diff --git a/Makefile b/Makefile index e4f9d619b9f97deb2be2e1448d584e96e6114ca4..61f670de557dba86523332b5e060512048756e21 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,7 @@ +## Copyright 2022 schukai GmbH. All rights reserved. +## Use of this source code is governed by a AGPL-3.0 +## license that can be found in the LICENSE file. + PROJECT_ROOT:=$(dir $(realpath $(lastword $(MAKEFILE_LIST)))) THIS_MAKEFILE:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) THIS_MAKEFILE_PATH:=$(PROJECT_ROOT)$(THIS_MAKEFILE) @@ -137,5 +141,16 @@ endif fetch-licenses: go-licenses save $(GO_CURRENT_MODULE) --ignore gitlab.schukai.com --force --save_path $(PROJECT_ROOT)licenses/ ; cd - +# https://spdx.github.io/spdx-spec/v2.3/SPDX-license-list/ +ADDLICENSE_BIN ?= addlicense +ifeq ($(shell command -v $(ADDLICENSE_BIN) 2> /dev/null),) + $(shell go install github.com/google/addlicense@latest) + EXECUTABLES = $(EXECUTABLES:-) $(ADDLICENSE_BIN); +endif + +.PHONY: add-licenses +## Add license headers to all go files +add-licenses: + addlicense -c "schukai GmbH" -s -l "AGPL-3.0-or-later" ./*.go diff --git a/api.go b/api.go index 86cdfb132fd0e025de5cd2b630184e47f1abc605..b8e79fd899d01982a805be60751c9f5ea4fbafa1 100644 --- a/api.go +++ b/api.go @@ -1,3 +1,6 @@ +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later + package configuration import "github.com/imdario/mergo" diff --git a/api_test.go b/api_test.go index 9a0c4eec870313168a87fa1e2e3d4cab7de9bdc7..4bce996938dc64ffffcb29459da8327855c0fb47 100644 --- a/api_test.go +++ b/api_test.go @@ -1,3 +1,6 @@ +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later + package configuration import ( diff --git a/benchmark_test.go b/benchmark_test.go index 9e55e52856f1115dff2d9807b9d8179776a319d0..094f9d704ee337b0f15ce10ccbf288c8498c9e67 100644 --- a/benchmark_test.go +++ b/benchmark_test.go @@ -1,3 +1,6 @@ +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later + package configuration import ( diff --git a/change.go b/change.go index d68aad6e6ffde8bd41dab5b8b213717ec873202c..d031649b1c0d12e288e46a0d146f24a1554bba86 100644 --- a/change.go +++ b/change.go @@ -1,3 +1,6 @@ +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later + package configuration import ( diff --git a/change_test.go b/change_test.go index 7e1b6616ecc7f7b931cf4ebe16f95e0e07656a03..0d4e8e7dc07535c5838fefb5c7a790e46a10604c 100644 --- a/change_test.go +++ b/change_test.go @@ -1,3 +1,6 @@ +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later + package configuration import ( diff --git a/constants.go b/constants.go index eb3eaffb457fdf428ca6bdc7fa9974574b24deb0..8506736c024095182882eb941dbd634f6346a889 100644 --- a/constants.go +++ b/constants.go @@ -1,3 +1,6 @@ +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later + package configuration const fileName = "config" diff --git a/env.go b/env.go index 871e4fe05a4d61784c84cc4f4816a06838d7bdd7..87dd684153fababd306da4103db1ac9aae4e13d4 100644 --- a/env.go +++ b/env.go @@ -1,3 +1,6 @@ +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later + package configuration import ( diff --git a/env_test.go b/env_test.go index 7847f142fbb366531c4a7371f775b55e0b012adb..9dbf42dc31036e7bf415371d4b992b676288bb99 100644 --- a/env_test.go +++ b/env_test.go @@ -1,3 +1,6 @@ +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later + package configuration import ( diff --git a/error.go b/error.go index 0addae37b10d3ed7658d4b08a8a7c90392def8d2..a02a0d61928b12f6249a9c2d58612349a8373cbf 100644 --- a/error.go +++ b/error.go @@ -1,3 +1,6 @@ +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later + package configuration import ( diff --git a/error_test.go b/error_test.go index e6c022bb2b183f43efc0b3d8944576b00bf5cbc0..4ba827a5535e607ad1400240b5d9f366aae195d9 100644 --- a/error_test.go +++ b/error_test.go @@ -1,3 +1,6 @@ +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later + package configuration import ( diff --git a/export.go b/export.go index 269817ba2eb6a1acf35d211e6619cb3194c78b79..82ed43dac7247b8f0fd9e512ce5e3f2747d05329 100644 --- a/export.go +++ b/export.go @@ -1,3 +1,6 @@ +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later + package configuration import ( diff --git a/export_test.go b/export_test.go index 8d87c1336b0d858a5c8fa8c9afbd93dcc06d5abd..2133e867bd48d6a776a2fdd319e8d4dee9c8c3f2 100644 --- a/export_test.go +++ b/export_test.go @@ -1,3 +1,6 @@ +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later + package configuration import ( diff --git a/file.go b/file.go index 8685fd2d7682028837862cc11c4d25f71de21514..3870c9c8158aa6699b8f23a62e265dfe5ebe0580 100644 --- a/file.go +++ b/file.go @@ -1,3 +1,6 @@ +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later + package configuration import ( diff --git a/file_test.go b/file_test.go index 677d43ebd50269b0f1f083c147b0a217ef6dd03f..4b05aa290e63efef2e7a8fa7b1fe2bd1bf8a6e88 100644 --- a/file_test.go +++ b/file_test.go @@ -1,3 +1,6 @@ +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later + package configuration import ( diff --git a/filesystem.go b/filesystem.go index 8e8d4cb53310e55d065cc35504a37678c5483758..302bff44d581327953fdfc7db3a6bf24200aebde 100644 --- a/filesystem.go +++ b/filesystem.go @@ -1,3 +1,6 @@ +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later + package configuration import ( diff --git a/filesystem_test.go b/filesystem_test.go index f0a061cde2a657554d244d20afbcc4cd0fadc1be..a236696a65895dc608886978d2f0c1aa665b163c 100644 --- a/filesystem_test.go +++ b/filesystem_test.go @@ -1,3 +1,6 @@ +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later + package configuration import "testing" diff --git a/flags.go b/flags.go index c9d75b849583f69b67a42cf139504e0bd7ec5874..44dcfb74c2a25f05092c49162391902c67141433 100644 --- a/flags.go +++ b/flags.go @@ -1,3 +1,6 @@ +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later + package configuration import ( diff --git a/flags_test.go b/flags_test.go index 435bd790686c208e1582eb884bcfc9d03bbab5d8..195180c3d45f8adbbf80799d553fa9a9954cbcb5 100644 --- a/flags_test.go +++ b/flags_test.go @@ -1,3 +1,6 @@ +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later + package configuration import ( diff --git a/format.go b/format.go index b7f10a43e7cc2841488ec6a953102f8c7a417fb4..e3f3e317bb8049b23af8c6169608ac4a9afa45ff 100644 --- a/format.go +++ b/format.go @@ -1,3 +1,6 @@ +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later + package configuration type Format int diff --git a/format_test.go b/format_test.go index aa2a876abf187ea99e499f2dcad6d3e9305cbcd2..a14897bb7c424d88cb05a3b4d18f0ee23cc2846d 100644 --- a/format_test.go +++ b/format_test.go @@ -1,3 +1,6 @@ +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later + package configuration import "testing" diff --git a/http-handler.go b/http-handler.go index c8f9bd10c7e01e55d4d7726f169aab9bc2af3457..058846ca8180ebae40c7d5363f06c0e62df83bf8 100644 --- a/http-handler.go +++ b/http-handler.go @@ -1,3 +1,6 @@ +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later + package configuration import ( diff --git a/http-handler_test.go b/http-handler_test.go index 9e65107326dc431fd72d630673ab7c6666eb4670..2f84e6fa3026ccf4dd9a237b39bed06fde0c5000 100644 --- a/http-handler_test.go +++ b/http-handler_test.go @@ -1,3 +1,6 @@ +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later + package configuration import ( diff --git a/import.go b/import.go index 82238ed1bbcc47a9f31a5cfed833a118650f09b2..687869a78cbf76b306263fd5d3231b13f4905812 100644 --- a/import.go +++ b/import.go @@ -1,3 +1,6 @@ +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later + package configuration import ( diff --git a/import_test.go b/import_test.go index f908f49aad55dcd27383b9954919921727f02013..9502c3608c0ed83ec41df062f4fb530dc5b6c3cd 100644 --- a/import_test.go +++ b/import_test.go @@ -1,3 +1,6 @@ +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later + package configuration import ( diff --git a/integration_test.go b/integration_test.go index 60ff24a393a090539d17904509c2e5163c2a77f6..0f0337df3c909fb5acd1593bc167f30c72afcb32 100644 --- a/integration_test.go +++ b/integration_test.go @@ -1,3 +1,6 @@ +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later + package configuration import ( diff --git a/properties.go b/properties.go index 0acc5db983b58c896553f94f7888602527c3583e..bc783eeec32c23008b004dfbbee9c660a7294940 100644 --- a/properties.go +++ b/properties.go @@ -1,3 +1,6 @@ +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later + package configuration import ( diff --git a/properties_test.go b/properties_test.go index 499b04faac55c586d079629f436b82264260ad96..b6dbc8b0a0461184d7cca35f2ac7486057676939 100644 --- a/properties_test.go +++ b/properties_test.go @@ -1,3 +1,6 @@ +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later + package configuration import ( diff --git a/settings.go b/settings.go index 1828db4e70bffd7cb64281ef216fbc33a498a896..dfbbce088f8e4e8dbc8cba3af9305e6ed5352d18 100644 --- a/settings.go +++ b/settings.go @@ -1,3 +1,6 @@ +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later + package configuration import ( diff --git a/settings_test.go b/settings_test.go index b7e1387ad8787e5612250f3b39aba0c51e9a3344..c0326e44ca190bf3f45dc74eabc3697a682c1b38 100644 --- a/settings_test.go +++ b/settings_test.go @@ -1,3 +1,6 @@ +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later + package configuration type ConfigStruct1 struct { diff --git a/stream.go b/stream.go index 035796b62afd84736bca1b267d9345ac2eb7d314..4c3f77ccd73b7c6705a3779767f19ffa4e9c115b 100644 --- a/stream.go +++ b/stream.go @@ -1,3 +1,6 @@ +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later + package configuration import "io" diff --git a/stream_test.go b/stream_test.go index 991403341f5f081d486bfe398b484f1bdd57976a..44db5df6633426450a58dfcdba684e354875554b 100644 --- a/stream_test.go +++ b/stream_test.go @@ -1,3 +1,6 @@ +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later + package configuration import ( diff --git a/tags.go b/tags.go index c3b964a2ae6d93f280f21396801ff155c0524bb7..3142e903d1c9412581ca628ae5def36a9c48fa17 100644 --- a/tags.go +++ b/tags.go @@ -1,3 +1,6 @@ +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later + package configuration import ( diff --git a/tags_test.go b/tags_test.go index 256fd7757681103228dd03b21df06df2df02a464..d21da608e7b5bb1f3bc76e778798a92ad1274931 100644 --- a/tags_test.go +++ b/tags_test.go @@ -1,3 +1,6 @@ +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later + package configuration import ( diff --git a/watch.go b/watch.go index 818c03b2d9696d02cad2756bf41f6aacc9f19f05..3d7ad7e5cafbe68a269496f59982de07a91e37ab 100644 --- a/watch.go +++ b/watch.go @@ -1,3 +1,6 @@ +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later + package configuration import ( diff --git a/watch_test.go b/watch_test.go index ea0b06f2ca2afb956837a061f5b0d3dfb3c88c01..76aa31031e73234d2da47620d3a5bda23380bbdc 100644 --- a/watch_test.go +++ b/watch_test.go @@ -1,3 +1,6 @@ +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later + package configuration import (