From 093b84112e19a2ad54ca3282726147bc7198b8f2 Mon Sep 17 00:00:00 2001 From: Ryan Leung Date: Tue, 21 Jan 2025 11:35:17 +0800 Subject: [PATCH] *: check file header (#9015) ref tikv/pd#4322 Signed-off-by: Ryan Leung --- .golangci.yml | 19 +++++++++++++ client/gc_client.go | 2 +- client/inner_client.go | 14 ++++++++++ client/pkg/caller/caller.go | 2 +- client/pkg/circuitbreaker/circuit_breaker.go | 3 +- .../circuitbreaker/circuit_breaker_test.go | 3 +- client/pkg/utils/testutil/check_env_dummy.go | 1 + client/pkg/utils/testutil/check_env_linux.go | 1 + client/pkg/utils/timerutil/pool.go | 14 ++++++++++ client/pkg/utils/timerutil/pool_test.go | 14 ++++++++++ .../controller/controller_test.go | 8 +++--- client/resource_group/controller/limiter.go | 8 +++--- .../resource_group/controller/limiter_test.go | 8 +++--- client/resource_group/controller/testutil.go | 8 +++--- client/resource_group/controller/util.go | 10 +++---- docs/swagger/placeholder.go | 14 ++++++++++ pkg/btree/btree_generic.go | 28 +++++++++---------- pkg/btree/btree_generic_test.go | 4 +-- pkg/errs/errno.go | 2 +- pkg/gc/safepoint_v2.go | 2 +- pkg/gctuner/tuner_test.go | 2 +- .../resourcemanager/server/resource_group.go | 2 +- .../server/resource_group_test.go | 14 ++++++++++ pkg/mcs/scheduling/server/cluster.go | 14 ++++++++++ pkg/mcs/server/server.go | 2 +- pkg/mcs/utils/constant/constant.go | 2 +- pkg/mcs/utils/expected_primary.go | 2 +- pkg/mcs/utils/util.go | 2 +- pkg/schedule/filter/filters_test.go | 3 +- .../schedulers/balance_benchmark_test.go | 3 +- pkg/storage/hot_region_storage.go | 2 +- pkg/storage/hot_region_storage_test.go | 1 + pkg/storage/leveldb_backend_test.go | 2 +- pkg/storage/region_storage.go | 2 +- pkg/storage/region_storage_test.go | 2 +- .../unsafe_recovery_controller.go | 2 +- .../unsafe_recovery_controller_test.go | 2 +- pkg/utils/grpcutil/grpcutil_test.go | 14 ++++++++++ pkg/utils/keypath/cluster_id.go | 2 +- pkg/utils/keypath/key_path_test.go | 2 +- pkg/utils/netutil/address_test.go | 3 +- pkg/utils/tempurl/check_env_dummy.go | 1 + pkg/utils/tempurl/check_env_linux.go | 1 + pkg/utils/timerutil/pool.go | 14 ++++++++++ pkg/utils/timerutil/pool_test.go | 14 ++++++++++ pkg/window/counter.go | 6 ++-- pkg/window/counter_test.go | 6 ++-- pkg/window/policy.go | 6 ++-- pkg/window/policy_test.go | 6 ++-- pkg/window/reduce.go | 6 ++-- pkg/window/window.go | 6 ++-- pkg/window/window_test.go | 6 ++-- server/api/pprof_test.go | 3 +- .../mcs/discovery/register_test.go | 2 +- tests/integrations/mcs/scheduling/api_test.go | 14 ++++++++++ .../mcs/scheduling/server_test.go | 2 +- tests/integrations/mcs/tso/server_test.go | 2 +- tests/integrations/realcluster/cluster.go | 2 +- .../realcluster/cluster_id_test.go | 2 +- .../integrations/realcluster/etcd_key_test.go | 2 +- tests/integrations/realcluster/mock_db.go | 2 +- .../realcluster/reboot_pd_test.go | 2 +- .../realcluster/scheduler_test.go | 2 +- tests/integrations/realcluster/ts_test.go | 2 +- tests/integrations/realcluster/util.go | 2 +- tools/pd-backup/pdbackup/backup_test.go | 14 ++++++++++ tools/pd-ctl/pdctl/command/global_test.go | 3 +- tools/pd-heartbeat-bench/config/config.go | 14 ++++++++++ tools/pd-simulator/simulator/metrics.go | 14 ++++++++++ tools/pd-ut/alloc/check_env_dummy.go | 1 + tools/pd-ut/alloc/check_env_linux.go | 1 + 71 files changed, 309 insertions(+), 94 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index a44052b22e8..561c785b078 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -29,6 +29,7 @@ linters: - reassign - intrange - gci + - goheader linters-settings: gocritic: # Which checks should be disabled; can't be combined with 'enabled-checks'; default is empty @@ -241,6 +242,24 @@ linters-settings: - prefix(github.com/pingcap) - prefix(github.com/tikv/pd) - blank + goheader: + values: + regexp: + COPYRIGHT-HEADER: Copyright \d{4} TiKV Project Authors. + template: |- + {{ COPYRIGHT-HEADER }} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. issues: exclude-rules: - path: (_test\.go|pkg/mock/.*\.go|tests/.*\.go) diff --git a/client/gc_client.go b/client/gc_client.go index 45fc8b40b91..117013ab2fa 100644 --- a/client/gc_client.go +++ b/client/gc_client.go @@ -4,7 +4,7 @@ // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, diff --git a/client/inner_client.go b/client/inner_client.go index 8379b6a51a9..cff5b95ed54 100644 --- a/client/inner_client.go +++ b/client/inner_client.go @@ -1,3 +1,17 @@ +// Copyright 2024 TiKV Project Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package pd import ( diff --git a/client/pkg/caller/caller.go b/client/pkg/caller/caller.go index 3df2297b0ac..04bd221216b 100644 --- a/client/pkg/caller/caller.go +++ b/client/pkg/caller/caller.go @@ -4,7 +4,7 @@ // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, diff --git a/client/pkg/circuitbreaker/circuit_breaker.go b/client/pkg/circuitbreaker/circuit_breaker.go index 0acee5d5c8d..7466124f2bc 100644 --- a/client/pkg/circuitbreaker/circuit_breaker.go +++ b/client/pkg/circuitbreaker/circuit_breaker.go @@ -4,13 +4,14 @@ // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + package circuitbreaker import ( diff --git a/client/pkg/circuitbreaker/circuit_breaker_test.go b/client/pkg/circuitbreaker/circuit_breaker_test.go index e62e55c1ab8..ff7da9508c2 100644 --- a/client/pkg/circuitbreaker/circuit_breaker_test.go +++ b/client/pkg/circuitbreaker/circuit_breaker_test.go @@ -4,13 +4,14 @@ // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + package circuitbreaker import ( diff --git a/client/pkg/utils/testutil/check_env_dummy.go b/client/pkg/utils/testutil/check_env_dummy.go index c8f4d268c9d..fed0636a112 100644 --- a/client/pkg/utils/testutil/check_env_dummy.go +++ b/client/pkg/utils/testutil/check_env_dummy.go @@ -11,6 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + //go:build !linux // +build !linux diff --git a/client/pkg/utils/testutil/check_env_linux.go b/client/pkg/utils/testutil/check_env_linux.go index ebe6a8e0663..0c566f0dcd6 100644 --- a/client/pkg/utils/testutil/check_env_linux.go +++ b/client/pkg/utils/testutil/check_env_linux.go @@ -11,6 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + //go:build linux // +build linux diff --git a/client/pkg/utils/timerutil/pool.go b/client/pkg/utils/timerutil/pool.go index cee061201c2..32f76b39572 100644 --- a/client/pkg/utils/timerutil/pool.go +++ b/client/pkg/utils/timerutil/pool.go @@ -1,3 +1,17 @@ +// Copyright 2023 TiKV Project Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Copyright 2020 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/client/pkg/utils/timerutil/pool_test.go b/client/pkg/utils/timerutil/pool_test.go index 3e0575daea3..ad550c7b56a 100644 --- a/client/pkg/utils/timerutil/pool_test.go +++ b/client/pkg/utils/timerutil/pool_test.go @@ -1,3 +1,17 @@ +// Copyright 2023 TiKV Project Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Copyright 2020 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/client/resource_group/controller/controller_test.go b/client/resource_group/controller/controller_test.go index f0bdc62d6d3..02fd9e3d750 100644 --- a/client/resource_group/controller/controller_test.go +++ b/client/resource_group/controller/controller_test.go @@ -1,7 +1,3 @@ -// Copyright 2023 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - // Copyright 2023 TiKV Project Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,6 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Copyright 2023 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + package controller import ( diff --git a/client/resource_group/controller/limiter.go b/client/resource_group/controller/limiter.go index c8843da00bd..1e1d2c4c475 100644 --- a/client/resource_group/controller/limiter.go +++ b/client/resource_group/controller/limiter.go @@ -1,7 +1,3 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - // Copyright 2023 TiKV Project Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,6 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + package controller import ( diff --git a/client/resource_group/controller/limiter_test.go b/client/resource_group/controller/limiter_test.go index 24cdee0bbc3..8c524defb23 100644 --- a/client/resource_group/controller/limiter_test.go +++ b/client/resource_group/controller/limiter_test.go @@ -1,7 +1,3 @@ -// Copyright 2023 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - // Copyright 2023 TiKV Project Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,6 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Copyright 2023 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + package controller import ( diff --git a/client/resource_group/controller/testutil.go b/client/resource_group/controller/testutil.go index de71cff4d0b..3e769545709 100644 --- a/client/resource_group/controller/testutil.go +++ b/client/resource_group/controller/testutil.go @@ -1,7 +1,3 @@ -// Copyright 2023 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - // Copyright 2023 TiKV Project Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,6 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Copyright 2023 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + package controller import "time" diff --git a/client/resource_group/controller/util.go b/client/resource_group/controller/util.go index 3b491e02c8f..09328746fea 100644 --- a/client/resource_group/controller/util.go +++ b/client/resource_group/controller/util.go @@ -1,14 +1,10 @@ -// Copyright 2023 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - // Copyright 2023 TiKV Project Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, @@ -16,6 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Copyright 2023 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + package controller import ( diff --git a/docs/swagger/placeholder.go b/docs/swagger/placeholder.go index c0a891a256f..ca1d43cbe0b 100644 --- a/docs/swagger/placeholder.go +++ b/docs/swagger/placeholder.go @@ -1 +1,15 @@ +// Copyright 2020 TiKV Project Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package swagger diff --git a/pkg/btree/btree_generic.go b/pkg/btree/btree_generic.go index 599614678eb..1318ea3eb4e 100644 --- a/pkg/btree/btree_generic.go +++ b/pkg/btree/btree_generic.go @@ -1,3 +1,17 @@ +// Copyright 2022 TiKV Project Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Copyright 2014-2022 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -59,20 +73,6 @@ // Those without this prefix are specific to the 'Item' interface, and use // its 'Less' function for ordering. -// Copyright 2022 TiKV Project Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - // nolint package btree diff --git a/pkg/btree/btree_generic_test.go b/pkg/btree/btree_generic_test.go index 8b432229470..1cf0851cb44 100644 --- a/pkg/btree/btree_generic_test.go +++ b/pkg/btree/btree_generic_test.go @@ -1,4 +1,4 @@ -// Copyright 2014-2022 Google Inc. +// Copyright 2022 TiKV Project Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// Copyright 2022 TiKV Project Authors. +// Copyright 2014-2022 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/errs/errno.go b/pkg/errs/errno.go index 25f69af327f..571d90b8651 100644 --- a/pkg/errs/errno.go +++ b/pkg/errs/errno.go @@ -1,4 +1,4 @@ -// Copyright 2020 PingCAP, Inc. +// Copyright 2020 TiKV Project Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/gc/safepoint_v2.go b/pkg/gc/safepoint_v2.go index acdd4e6eef8..3ecae974785 100644 --- a/pkg/gc/safepoint_v2.go +++ b/pkg/gc/safepoint_v2.go @@ -4,7 +4,7 @@ // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, diff --git a/pkg/gctuner/tuner_test.go b/pkg/gctuner/tuner_test.go index d46bb8edf94..ef02010bcb7 100644 --- a/pkg/gctuner/tuner_test.go +++ b/pkg/gctuner/tuner_test.go @@ -4,7 +4,7 @@ // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, diff --git a/pkg/mcs/resourcemanager/server/resource_group.go b/pkg/mcs/resourcemanager/server/resource_group.go index 65d2959e870..d8ac16c7c5b 100644 --- a/pkg/mcs/resourcemanager/server/resource_group.go +++ b/pkg/mcs/resourcemanager/server/resource_group.go @@ -4,7 +4,7 @@ // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, diff --git a/pkg/mcs/resourcemanager/server/resource_group_test.go b/pkg/mcs/resourcemanager/server/resource_group_test.go index 8f058a212bb..a72e09172c6 100644 --- a/pkg/mcs/resourcemanager/server/resource_group_test.go +++ b/pkg/mcs/resourcemanager/server/resource_group_test.go @@ -1,3 +1,17 @@ +// Copyright 2022 TiKV Project Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package server import ( diff --git a/pkg/mcs/scheduling/server/cluster.go b/pkg/mcs/scheduling/server/cluster.go index c07174762ff..b55655e9747 100644 --- a/pkg/mcs/scheduling/server/cluster.go +++ b/pkg/mcs/scheduling/server/cluster.go @@ -1,3 +1,17 @@ +// Copyright 2023 TiKV Project Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package server import ( diff --git a/pkg/mcs/server/server.go b/pkg/mcs/server/server.go index 9692b52beb3..2f06829c9f0 100644 --- a/pkg/mcs/server/server.go +++ b/pkg/mcs/server/server.go @@ -4,7 +4,7 @@ // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, diff --git a/pkg/mcs/utils/constant/constant.go b/pkg/mcs/utils/constant/constant.go index 6f684bdb977..297c4798257 100644 --- a/pkg/mcs/utils/constant/constant.go +++ b/pkg/mcs/utils/constant/constant.go @@ -4,7 +4,7 @@ // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, diff --git a/pkg/mcs/utils/expected_primary.go b/pkg/mcs/utils/expected_primary.go index b8a317ed251..a31abc9e88f 100644 --- a/pkg/mcs/utils/expected_primary.go +++ b/pkg/mcs/utils/expected_primary.go @@ -4,7 +4,7 @@ // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, diff --git a/pkg/mcs/utils/util.go b/pkg/mcs/utils/util.go index 9e187b3a361..92f8a1d1e8b 100644 --- a/pkg/mcs/utils/util.go +++ b/pkg/mcs/utils/util.go @@ -4,7 +4,7 @@ // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, diff --git a/pkg/schedule/filter/filters_test.go b/pkg/schedule/filter/filters_test.go index 35ba2c33589..c093f249083 100644 --- a/pkg/schedule/filter/filters_test.go +++ b/pkg/schedule/filter/filters_test.go @@ -4,13 +4,14 @@ // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + package filter import ( diff --git a/pkg/schedule/schedulers/balance_benchmark_test.go b/pkg/schedule/schedulers/balance_benchmark_test.go index abf4c0b3def..ae807b2c363 100644 --- a/pkg/schedule/schedulers/balance_benchmark_test.go +++ b/pkg/schedule/schedulers/balance_benchmark_test.go @@ -4,13 +4,14 @@ // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + package schedulers import ( diff --git a/pkg/storage/hot_region_storage.go b/pkg/storage/hot_region_storage.go index b5ec8dda6ba..bbf5fef456d 100644 --- a/pkg/storage/hot_region_storage.go +++ b/pkg/storage/hot_region_storage.go @@ -4,7 +4,7 @@ // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, diff --git a/pkg/storage/hot_region_storage_test.go b/pkg/storage/hot_region_storage_test.go index cd713685eb0..92d6a1c96cd 100644 --- a/pkg/storage/hot_region_storage_test.go +++ b/pkg/storage/hot_region_storage_test.go @@ -8,6 +8,7 @@ // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. diff --git a/pkg/storage/leveldb_backend_test.go b/pkg/storage/leveldb_backend_test.go index 0bf626834cd..d4b73ee9059 100644 --- a/pkg/storage/leveldb_backend_test.go +++ b/pkg/storage/leveldb_backend_test.go @@ -4,7 +4,7 @@ // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, diff --git a/pkg/storage/region_storage.go b/pkg/storage/region_storage.go index 8e6a4d87429..e7a744b6f9d 100644 --- a/pkg/storage/region_storage.go +++ b/pkg/storage/region_storage.go @@ -4,7 +4,7 @@ // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, diff --git a/pkg/storage/region_storage_test.go b/pkg/storage/region_storage_test.go index c0ae04c8ded..a611420315a 100644 --- a/pkg/storage/region_storage_test.go +++ b/pkg/storage/region_storage_test.go @@ -4,7 +4,7 @@ // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, diff --git a/pkg/unsaferecovery/unsafe_recovery_controller.go b/pkg/unsaferecovery/unsafe_recovery_controller.go index dce2069e316..5ece375f5de 100644 --- a/pkg/unsaferecovery/unsafe_recovery_controller.go +++ b/pkg/unsaferecovery/unsafe_recovery_controller.go @@ -4,7 +4,7 @@ // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, diff --git a/pkg/unsaferecovery/unsafe_recovery_controller_test.go b/pkg/unsaferecovery/unsafe_recovery_controller_test.go index 0dab6aeca1d..669ca16de34 100644 --- a/pkg/unsaferecovery/unsafe_recovery_controller_test.go +++ b/pkg/unsaferecovery/unsafe_recovery_controller_test.go @@ -4,7 +4,7 @@ // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, diff --git a/pkg/utils/grpcutil/grpcutil_test.go b/pkg/utils/grpcutil/grpcutil_test.go index db77a2e4002..d11777a3cfc 100644 --- a/pkg/utils/grpcutil/grpcutil_test.go +++ b/pkg/utils/grpcutil/grpcutil_test.go @@ -1,3 +1,17 @@ +// Copyright 2019 TiKV Project Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package grpcutil import ( diff --git a/pkg/utils/keypath/cluster_id.go b/pkg/utils/keypath/cluster_id.go index e1117f15738..f12e6205916 100644 --- a/pkg/utils/keypath/cluster_id.go +++ b/pkg/utils/keypath/cluster_id.go @@ -4,7 +4,7 @@ // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, diff --git a/pkg/utils/keypath/key_path_test.go b/pkg/utils/keypath/key_path_test.go index 18096ca47bb..e6c2a4c3f6b 100644 --- a/pkg/utils/keypath/key_path_test.go +++ b/pkg/utils/keypath/key_path_test.go @@ -4,7 +4,7 @@ // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, diff --git a/pkg/utils/netutil/address_test.go b/pkg/utils/netutil/address_test.go index 127c9a6d0f7..70302450a7d 100644 --- a/pkg/utils/netutil/address_test.go +++ b/pkg/utils/netutil/address_test.go @@ -4,13 +4,14 @@ // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + package netutil import ( diff --git a/pkg/utils/tempurl/check_env_dummy.go b/pkg/utils/tempurl/check_env_dummy.go index 58d889bbfd6..81d1acdbe7e 100644 --- a/pkg/utils/tempurl/check_env_dummy.go +++ b/pkg/utils/tempurl/check_env_dummy.go @@ -11,6 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + //go:build !linux // +build !linux diff --git a/pkg/utils/tempurl/check_env_linux.go b/pkg/utils/tempurl/check_env_linux.go index 7e3dffc105b..15c17f55753 100644 --- a/pkg/utils/tempurl/check_env_linux.go +++ b/pkg/utils/tempurl/check_env_linux.go @@ -11,6 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + //go:build linux // +build linux diff --git a/pkg/utils/timerutil/pool.go b/pkg/utils/timerutil/pool.go index cee061201c2..32f76b39572 100644 --- a/pkg/utils/timerutil/pool.go +++ b/pkg/utils/timerutil/pool.go @@ -1,3 +1,17 @@ +// Copyright 2023 TiKV Project Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Copyright 2020 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/pkg/utils/timerutil/pool_test.go b/pkg/utils/timerutil/pool_test.go index 3e0575daea3..ad550c7b56a 100644 --- a/pkg/utils/timerutil/pool_test.go +++ b/pkg/utils/timerutil/pool_test.go @@ -1,3 +1,17 @@ +// Copyright 2023 TiKV Project Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Copyright 2020 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/pkg/window/counter.go b/pkg/window/counter.go index c56c202a414..faf8d0dddc6 100644 --- a/pkg/window/counter.go +++ b/pkg/window/counter.go @@ -1,6 +1,3 @@ -// The MIT License (MIT) -// Copyright (c) 2022 go-kratos Project Authors. -// // Copyright 2023 TiKV Project Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,6 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +// The MIT License (MIT) +// Copyright (c) 2022 go-kratos Project Authors. + package window import ( diff --git a/pkg/window/counter_test.go b/pkg/window/counter_test.go index 2cb25babdba..86a32f53537 100644 --- a/pkg/window/counter_test.go +++ b/pkg/window/counter_test.go @@ -1,6 +1,3 @@ -// The MIT License (MIT) -// Copyright (c) 2022 go-kratos Project Authors. -// // Copyright 2023 TiKV Project Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,6 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +// The MIT License (MIT) +// Copyright (c) 2022 go-kratos Project Authors. + package window import ( diff --git a/pkg/window/policy.go b/pkg/window/policy.go index 14e33e3ee74..1852ba21ac5 100644 --- a/pkg/window/policy.go +++ b/pkg/window/policy.go @@ -1,6 +1,3 @@ -// The MIT License (MIT) -// Copyright (c) 2022 go-kratos Project Authors. -// // Copyright 2023 TiKV Project Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,6 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +// The MIT License (MIT) +// Copyright (c) 2022 go-kratos Project Authors. + package window import ( diff --git a/pkg/window/policy_test.go b/pkg/window/policy_test.go index b5a04c03e4b..7289b2c85c0 100644 --- a/pkg/window/policy_test.go +++ b/pkg/window/policy_test.go @@ -1,6 +1,3 @@ -// The MIT License (MIT) -// Copyright (c) 2022 go-kratos Project Authors. -// // Copyright 2023 TiKV Project Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,6 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +// The MIT License (MIT) +// Copyright (c) 2022 go-kratos Project Authors. + package window import ( diff --git a/pkg/window/reduce.go b/pkg/window/reduce.go index 0df21ff4c4f..f6968d0b72f 100644 --- a/pkg/window/reduce.go +++ b/pkg/window/reduce.go @@ -1,6 +1,3 @@ -// The MIT License (MIT) -// Copyright (c) 2022 go-kratos Project Authors. -// // Copyright 2023 TiKV Project Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,6 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +// The MIT License (MIT) +// Copyright (c) 2022 go-kratos Project Authors. + package window // Sum the values within the window. diff --git a/pkg/window/window.go b/pkg/window/window.go index 6d7a54131ce..c48e4b96b42 100644 --- a/pkg/window/window.go +++ b/pkg/window/window.go @@ -1,6 +1,3 @@ -// The MIT License (MIT) -// Copyright (c) 2022 go-kratos Project Authors. -// // Copyright 2023 TiKV Project Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,6 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +// The MIT License (MIT) +// Copyright (c) 2022 go-kratos Project Authors. + package window import "fmt" diff --git a/pkg/window/window_test.go b/pkg/window/window_test.go index 4cedd12ae01..ffc0e5af4bb 100644 --- a/pkg/window/window_test.go +++ b/pkg/window/window_test.go @@ -1,6 +1,3 @@ -// The MIT License (MIT) -// Copyright (c) 2022 go-kratos Project Authors. -// // Copyright 2023 TiKV Project Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,6 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +// The MIT License (MIT) +// Copyright (c) 2022 go-kratos Project Authors. + package window import ( diff --git a/server/api/pprof_test.go b/server/api/pprof_test.go index 1bb1668e374..fc3e37adf83 100644 --- a/server/api/pprof_test.go +++ b/server/api/pprof_test.go @@ -4,13 +4,14 @@ // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + package api import ( diff --git a/tests/integrations/mcs/discovery/register_test.go b/tests/integrations/mcs/discovery/register_test.go index 217d8137e5b..92fe11dbcb0 100644 --- a/tests/integrations/mcs/discovery/register_test.go +++ b/tests/integrations/mcs/discovery/register_test.go @@ -4,7 +4,7 @@ // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, diff --git a/tests/integrations/mcs/scheduling/api_test.go b/tests/integrations/mcs/scheduling/api_test.go index 55407831df2..75d784dcb6e 100644 --- a/tests/integrations/mcs/scheduling/api_test.go +++ b/tests/integrations/mcs/scheduling/api_test.go @@ -1,3 +1,17 @@ +// Copyright 2023 TiKV Project Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package scheduling_test import ( diff --git a/tests/integrations/mcs/scheduling/server_test.go b/tests/integrations/mcs/scheduling/server_test.go index d79bcb47228..9b01e6e48a6 100644 --- a/tests/integrations/mcs/scheduling/server_test.go +++ b/tests/integrations/mcs/scheduling/server_test.go @@ -4,7 +4,7 @@ // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, diff --git a/tests/integrations/mcs/tso/server_test.go b/tests/integrations/mcs/tso/server_test.go index 168741204de..84044867409 100644 --- a/tests/integrations/mcs/tso/server_test.go +++ b/tests/integrations/mcs/tso/server_test.go @@ -4,7 +4,7 @@ // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, diff --git a/tests/integrations/realcluster/cluster.go b/tests/integrations/realcluster/cluster.go index fc5d1bc4441..9485a2aff79 100644 --- a/tests/integrations/realcluster/cluster.go +++ b/tests/integrations/realcluster/cluster.go @@ -1,4 +1,4 @@ -// Copyright 2024 TiKV Authors +// Copyright 2024 TiKV Project Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tests/integrations/realcluster/cluster_id_test.go b/tests/integrations/realcluster/cluster_id_test.go index 82233cd5b8c..32e038e74d4 100644 --- a/tests/integrations/realcluster/cluster_id_test.go +++ b/tests/integrations/realcluster/cluster_id_test.go @@ -1,4 +1,4 @@ -// Copyright 2024 TiKV Authors +// Copyright 2024 TiKV Project Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tests/integrations/realcluster/etcd_key_test.go b/tests/integrations/realcluster/etcd_key_test.go index 10c392834af..c96455e4667 100644 --- a/tests/integrations/realcluster/etcd_key_test.go +++ b/tests/integrations/realcluster/etcd_key_test.go @@ -1,4 +1,4 @@ -// Copyright 2024 TiKV Authors +// Copyright 2024 TiKV Project Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tests/integrations/realcluster/mock_db.go b/tests/integrations/realcluster/mock_db.go index 8a21bc1bb7d..eda12e941df 100644 --- a/tests/integrations/realcluster/mock_db.go +++ b/tests/integrations/realcluster/mock_db.go @@ -1,4 +1,4 @@ -// Copyright 2023 TiKV Authors +// Copyright 2023 TiKV Project Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tests/integrations/realcluster/reboot_pd_test.go b/tests/integrations/realcluster/reboot_pd_test.go index 1a042872b93..ef85ea0bf99 100644 --- a/tests/integrations/realcluster/reboot_pd_test.go +++ b/tests/integrations/realcluster/reboot_pd_test.go @@ -1,4 +1,4 @@ -// Copyright 2023 TiKV Authors +// Copyright 2023 TiKV Project Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tests/integrations/realcluster/scheduler_test.go b/tests/integrations/realcluster/scheduler_test.go index 0e4d10acd80..4daafdeca27 100644 --- a/tests/integrations/realcluster/scheduler_test.go +++ b/tests/integrations/realcluster/scheduler_test.go @@ -1,4 +1,4 @@ -// Copyright 2024 TiKV Authors +// Copyright 2024 TiKV Project Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tests/integrations/realcluster/ts_test.go b/tests/integrations/realcluster/ts_test.go index 58f50abdf3e..4df0b9181c4 100644 --- a/tests/integrations/realcluster/ts_test.go +++ b/tests/integrations/realcluster/ts_test.go @@ -1,4 +1,4 @@ -// Copyright 2023 TiKV Authors +// Copyright 2023 TiKV Project Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tests/integrations/realcluster/util.go b/tests/integrations/realcluster/util.go index a33f9c071c6..fc350832eea 100644 --- a/tests/integrations/realcluster/util.go +++ b/tests/integrations/realcluster/util.go @@ -1,4 +1,4 @@ -// Copyright 2023 TiKV Authors +// Copyright 2023 TiKV Project Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tools/pd-backup/pdbackup/backup_test.go b/tools/pd-backup/pdbackup/backup_test.go index 3734fb6782b..e6dc1e6345f 100644 --- a/tools/pd-backup/pdbackup/backup_test.go +++ b/tools/pd-backup/pdbackup/backup_test.go @@ -1,3 +1,17 @@ +// Copyright 2022 TiKV Project Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package pdbackup import ( diff --git a/tools/pd-ctl/pdctl/command/global_test.go b/tools/pd-ctl/pdctl/command/global_test.go index 0d1cf74ac74..74efec76d5c 100644 --- a/tools/pd-ctl/pdctl/command/global_test.go +++ b/tools/pd-ctl/pdctl/command/global_test.go @@ -4,13 +4,14 @@ // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + package command import ( diff --git a/tools/pd-heartbeat-bench/config/config.go b/tools/pd-heartbeat-bench/config/config.go index 41c14845074..42a506b7d50 100644 --- a/tools/pd-heartbeat-bench/config/config.go +++ b/tools/pd-heartbeat-bench/config/config.go @@ -1,3 +1,17 @@ +// Copyright 2022 TiKV Project Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package config import ( diff --git a/tools/pd-simulator/simulator/metrics.go b/tools/pd-simulator/simulator/metrics.go index 19e675c56a9..fabd626591e 100644 --- a/tools/pd-simulator/simulator/metrics.go +++ b/tools/pd-simulator/simulator/metrics.go @@ -1,3 +1,17 @@ +// Copyright 2022 TiKV Project Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package simulator import "github.com/prometheus/client_golang/prometheus" diff --git a/tools/pd-ut/alloc/check_env_dummy.go b/tools/pd-ut/alloc/check_env_dummy.go index b9b8eb4827a..1375623c1d8 100644 --- a/tools/pd-ut/alloc/check_env_dummy.go +++ b/tools/pd-ut/alloc/check_env_dummy.go @@ -11,6 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + //go:build !linux // +build !linux diff --git a/tools/pd-ut/alloc/check_env_linux.go b/tools/pd-ut/alloc/check_env_linux.go index c4d20bf6a65..4e1c058bfb6 100644 --- a/tools/pd-ut/alloc/check_env_linux.go +++ b/tools/pd-ut/alloc/check_env_linux.go @@ -11,6 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + //go:build linux // +build linux