diff --git a/cmd/dfdaemon/app/init.go b/cmd/dfdaemon/app/init.go index f169e8dd8..8570120c1 100644 --- a/cmd/dfdaemon/app/init.go +++ b/cmd/dfdaemon/app/init.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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 app import ( diff --git a/cmd/dfdaemon/app/root_test.go b/cmd/dfdaemon/app/root_test.go index ec618fb04..11c153121 100644 --- a/cmd/dfdaemon/app/root_test.go +++ b/cmd/dfdaemon/app/root_test.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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 app import ( diff --git a/cmd/dfdaemon/app/version.go b/cmd/dfdaemon/app/version.go index 17dc57eba..b76d085d7 100644 --- a/cmd/dfdaemon/app/version.go +++ b/cmd/dfdaemon/app/version.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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 app import ( diff --git a/cmd/supernode/app/version.go b/cmd/supernode/app/version.go index 91ab4be3a..eda8ca859 100644 --- a/cmd/supernode/app/version.go +++ b/cmd/supernode/app/version.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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 app import ( diff --git a/dfdaemon/proxy/proxy.go b/dfdaemon/proxy/proxy.go index 27ab8b1e3..949604657 100644 --- a/dfdaemon/proxy/proxy.go +++ b/dfdaemon/proxy/proxy.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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 proxy import ( diff --git a/dfdaemon/proxy/proxy_test.go b/dfdaemon/proxy/proxy_test.go index 9d4c6ce5c..d5c505248 100644 --- a/dfdaemon/proxy/proxy_test.go +++ b/dfdaemon/proxy/proxy_test.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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 proxy import ( diff --git a/dfdaemon/server.go b/dfdaemon/server.go index 5f2f83f85..e8d6fa751 100644 --- a/dfdaemon/server.go +++ b/dfdaemon/server.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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 dfdaemon import ( diff --git a/hack/boilerplate/check-boilerplate.go b/hack/boilerplate/check-boilerplate.go new file mode 100644 index 000000000..96a972c85 --- /dev/null +++ b/hack/boilerplate/check-boilerplate.go @@ -0,0 +1,129 @@ +/* + * Copyright The Dragonfly 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 main + +import ( + "errors" + "fmt" + "io/ioutil" + "os" + "strings" +) + +var ( + start = " * Copyright " + end = " * limitations under the License." + boilerplate = []string{ + ` * Copyright The Dragonfly 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.`, + } +) + +// checkBoilerplate checks if the input string contains the boilerplate +func checkBoilerplate(content string) error { + // ignore generated files + if strings.Contains(content, "DO NOT EDIT") { + return nil + } + + index := 0 + foundStart := false + lines := strings.Split(content, "\n") + for _, line := range lines { + // find the start of the boilerplate + bpLine := boilerplate[index] + if strings.Contains(line, start) { + foundStart = true + } + + // match line by line + if foundStart { + if line != bpLine { + return fmt.Errorf("boilerplate line %d does not match\nexpected: %q\ngot: %q", index+1, bpLine, line) + } + index++ + // exit after the last line is found + if strings.Index(line, end) == 0 { + break + } + } + } + + if !foundStart { + return fmt.Errorf("the file is missing a boilerplate") + } + if index < len(boilerplate) { + return errors.New("boilerplate has missing lines") + } + return nil +} + +// verifyFile verifies if a file contains the boilerplate +func verifyFile(filePath string) error { + if len(filePath) == 0 { + return errors.New("empty file name") + } + + // check file extension is go + idx := strings.LastIndex(filePath, ".") + if idx == -1 { + return nil + } + + // check if the file has a supported extension + ext := filePath[idx : idx+len(filePath)-idx] + if ext != ".go" { + return nil + } + + // read the file + b, err := ioutil.ReadFile(filePath) + if err != nil { + return err + } + + return checkBoilerplate(string(b)) +} + +func main() { + if len(os.Args) < 2 { + fmt.Println("usage: go run check-boilerplate.go ...") + os.Exit(1) + } + + hasErr := false + for _, filePath := range os.Args[1:] { + if err := verifyFile(filePath); err != nil { + fmt.Printf("error validating %q: %v\n", filePath, err) + hasErr = true + } + } + if hasErr { + os.Exit(1) + } +} diff --git a/hack/boilerplate/check-boilerplate_test.go b/hack/boilerplate/check-boilerplate_test.go new file mode 100644 index 000000000..0e163ea9c --- /dev/null +++ b/hack/boilerplate/check-boilerplate_test.go @@ -0,0 +1,65 @@ +/* + * Copyright The Dragonfly 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 main + +import ( + "testing" +) + +func TestVerifyBoilerPlate(t *testing.T) { + testcases := []struct { + name string + bp string + expectedError bool + }{ + { + name: "valid: boilerplate is valid", + bp: `/* + * Copyright The Dragonfly 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. +*/`, + expectedError: false, + }, + { + name: "invalid: missing lines", + bp: ` + * Copyright The Dragonfly Authors. + * Licensed under the Apache License, Version 2.0 (the "License"); +`, + expectedError: true, + }, + } + + for _, tc := range testcases { + t.Run(tc.name, func(t *testing.T) { + if err := checkBoilerplate(tc.bp); err != nil != tc.expectedError { + t.Errorf("expected error: %v, got: %v, error: %v", tc.expectedError, err != nil, err) + } + }) + } +} diff --git a/hack/check.sh b/hack/check.sh index 7f9a860bc..c5aa51bfc 100755 --- a/hack/check.sh +++ b/hack/check.sh @@ -32,6 +32,14 @@ check() { echo "CHECK: go vet, check code syntax" packages=$(go list ./... | sed 's/^_//') echo "${packages}" | xargs go vet 2>&1 + + # boilerplate check + echo "CHECK: boilerpalte, check code boilerplate" + result=$(git ls-files | xargs go run ./hack/boilerplate/check-boilerplate.go) + if [[ ${#result} -gt 0 ]]; then + echo "${result}" + return 1 + fi } check diff --git a/pkg/ratelimiter/ratelimiter.go b/pkg/ratelimiter/ratelimiter.go index 879cd086d..cc7737ffb 100644 --- a/pkg/ratelimiter/ratelimiter.go +++ b/pkg/ratelimiter/ratelimiter.go @@ -2,7 +2,7 @@ * Copyright The Dragonfly Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use rl file except in compliance with 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 diff --git a/pkg/util/metrics_util.go b/pkg/util/metrics_util.go index a1eba76e0..9d1d27a2a 100644 --- a/pkg/util/metrics_util.go +++ b/pkg/util/metrics_util.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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 util import ( diff --git a/supernode/config/config.go b/supernode/config/config.go index 3210ac512..8f9d6dd71 100644 --- a/supernode/config/config.go +++ b/supernode/config/config.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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/supernode/daemon/daemon.go b/supernode/daemon/daemon.go index e9212db81..21490476b 100644 --- a/supernode/daemon/daemon.go +++ b/supernode/daemon/daemon.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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 daemon import ( diff --git a/supernode/daemon/mgr/cdn/cache_detector.go b/supernode/daemon/mgr/cdn/cache_detector.go index b28929acb..328af7c7e 100644 --- a/supernode/daemon/mgr/cdn/cache_detector.go +++ b/supernode/daemon/mgr/cdn/cache_detector.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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 cdn import ( diff --git a/supernode/daemon/mgr/cdn/cdn_util.go b/supernode/daemon/mgr/cdn/cdn_util.go index 10fd587f8..f7870b1a8 100644 --- a/supernode/daemon/mgr/cdn/cdn_util.go +++ b/supernode/daemon/mgr/cdn/cdn_util.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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 cdn import ( diff --git a/supernode/daemon/mgr/cdn/downloader.go b/supernode/daemon/mgr/cdn/downloader.go index 790766ca0..4b4f535cc 100644 --- a/supernode/daemon/mgr/cdn/downloader.go +++ b/supernode/daemon/mgr/cdn/downloader.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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 cdn import ( diff --git a/supernode/daemon/mgr/cdn/file_meta_data.go b/supernode/daemon/mgr/cdn/file_meta_data.go index 7ccdc67ba..a284fbd01 100644 --- a/supernode/daemon/mgr/cdn/file_meta_data.go +++ b/supernode/daemon/mgr/cdn/file_meta_data.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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 cdn import ( diff --git a/supernode/daemon/mgr/cdn/manager.go b/supernode/daemon/mgr/cdn/manager.go index 1d9301140..d955d0104 100644 --- a/supernode/daemon/mgr/cdn/manager.go +++ b/supernode/daemon/mgr/cdn/manager.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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 cdn import ( diff --git a/supernode/daemon/mgr/cdn/reporter.go b/supernode/daemon/mgr/cdn/reporter.go index e503fb2c9..3e03db718 100644 --- a/supernode/daemon/mgr/cdn/reporter.go +++ b/supernode/daemon/mgr/cdn/reporter.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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 cdn import ( diff --git a/supernode/daemon/mgr/cdn/super_reader.go b/supernode/daemon/mgr/cdn/super_reader.go index bc9ae6728..385d9504b 100644 --- a/supernode/daemon/mgr/cdn/super_reader.go +++ b/supernode/daemon/mgr/cdn/super_reader.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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 cdn import ( diff --git a/supernode/daemon/mgr/cdn/super_writer.go b/supernode/daemon/mgr/cdn/super_writer.go index 9aa2ef404..960cfd491 100644 --- a/supernode/daemon/mgr/cdn/super_writer.go +++ b/supernode/daemon/mgr/cdn/super_writer.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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 cdn import ( diff --git a/supernode/daemon/mgr/cdn/super_writer_util.go b/supernode/daemon/mgr/cdn/super_writer_util.go index 94f3f90fb..1d7bd8bf3 100644 --- a/supernode/daemon/mgr/cdn/super_writer_util.go +++ b/supernode/daemon/mgr/cdn/super_writer_util.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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 cdn import ( diff --git a/supernode/daemon/mgr/cdn_mgr.go b/supernode/daemon/mgr/cdn_mgr.go index d1484f293..305ae9524 100644 --- a/supernode/daemon/mgr/cdn_mgr.go +++ b/supernode/daemon/mgr/cdn_mgr.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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 mgr import ( diff --git a/supernode/daemon/mgr/dfget_task_mgr.go b/supernode/daemon/mgr/dfget_task_mgr.go index 09b08c1c4..6465b03e8 100644 --- a/supernode/daemon/mgr/dfget_task_mgr.go +++ b/supernode/daemon/mgr/dfget_task_mgr.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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 mgr import ( diff --git a/supernode/daemon/mgr/dfgettask/manager.go b/supernode/daemon/mgr/dfgettask/manager.go index 13559ed82..b417e6fcb 100644 --- a/supernode/daemon/mgr/dfgettask/manager.go +++ b/supernode/daemon/mgr/dfgettask/manager.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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 dfgettask import ( diff --git a/supernode/daemon/mgr/peer/manager.go b/supernode/daemon/mgr/peer/manager.go index 00b450f66..969452fc1 100644 --- a/supernode/daemon/mgr/peer/manager.go +++ b/supernode/daemon/mgr/peer/manager.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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 peer import ( diff --git a/supernode/daemon/mgr/peer_mgr.go b/supernode/daemon/mgr/peer_mgr.go index 22aecbf3c..965fd74cb 100644 --- a/supernode/daemon/mgr/peer_mgr.go +++ b/supernode/daemon/mgr/peer_mgr.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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 mgr import ( diff --git a/supernode/daemon/mgr/progress/piece_state.go b/supernode/daemon/mgr/progress/piece_state.go index ca1947e11..446084361 100644 --- a/supernode/daemon/mgr/progress/piece_state.go +++ b/supernode/daemon/mgr/progress/piece_state.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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 progress import ( diff --git a/supernode/daemon/mgr/progress/progress_manager.go b/supernode/daemon/mgr/progress/progress_manager.go index 2dc738df5..9cd9925e5 100644 --- a/supernode/daemon/mgr/progress/progress_manager.go +++ b/supernode/daemon/mgr/progress/progress_manager.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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 progress import ( diff --git a/supernode/daemon/mgr/progress/progress_state.go b/supernode/daemon/mgr/progress/progress_state.go index 26fe16b17..4d3540ff1 100644 --- a/supernode/daemon/mgr/progress/progress_state.go +++ b/supernode/daemon/mgr/progress/progress_state.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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 progress import ( diff --git a/supernode/daemon/mgr/progress/progress_util.go b/supernode/daemon/mgr/progress/progress_util.go index 89ed636e2..df2371010 100644 --- a/supernode/daemon/mgr/progress/progress_util.go +++ b/supernode/daemon/mgr/progress/progress_util.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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 progress import ( diff --git a/supernode/daemon/mgr/progress/state_sync_map.go b/supernode/daemon/mgr/progress/state_sync_map.go index da6ec4cc0..b065fcb6e 100644 --- a/supernode/daemon/mgr/progress/state_sync_map.go +++ b/supernode/daemon/mgr/progress/state_sync_map.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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 progress import ( diff --git a/supernode/daemon/mgr/progress_mgr.go b/supernode/daemon/mgr/progress_mgr.go index 12ed923c6..e9506c658 100644 --- a/supernode/daemon/mgr/progress_mgr.go +++ b/supernode/daemon/mgr/progress_mgr.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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 mgr import ( diff --git a/supernode/daemon/mgr/scheduler/manager.go b/supernode/daemon/mgr/scheduler/manager.go index e62ac5bab..dd0d23662 100644 --- a/supernode/daemon/mgr/scheduler/manager.go +++ b/supernode/daemon/mgr/scheduler/manager.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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 scheduler import ( diff --git a/supernode/daemon/mgr/scheduler_mgr.go b/supernode/daemon/mgr/scheduler_mgr.go index 4c1a3bfff..7158e5a42 100644 --- a/supernode/daemon/mgr/scheduler_mgr.go +++ b/supernode/daemon/mgr/scheduler_mgr.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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 mgr import ( diff --git a/supernode/daemon/mgr/task/manager.go b/supernode/daemon/mgr/task/manager.go index fa6452f54..d62b5e98a 100644 --- a/supernode/daemon/mgr/task/manager.go +++ b/supernode/daemon/mgr/task/manager.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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 task import ( diff --git a/supernode/daemon/mgr/task_mgr.go b/supernode/daemon/mgr/task_mgr.go index df24da35f..1fd3308b1 100644 --- a/supernode/daemon/mgr/task_mgr.go +++ b/supernode/daemon/mgr/task_mgr.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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 mgr import ( diff --git a/supernode/daemon/util/filter.go b/supernode/daemon/util/filter.go index 6a40f2c29..9106f32b1 100644 --- a/supernode/daemon/util/filter.go +++ b/supernode/daemon/util/filter.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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 util import ( diff --git a/supernode/daemon/util/store.go b/supernode/daemon/util/store.go index 3d1474b51..093a965da 100644 --- a/supernode/daemon/util/store.go +++ b/supernode/daemon/util/store.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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 util import ( diff --git a/supernode/httpclient/origin_http_client.go b/supernode/httpclient/origin_http_client.go index 9f7c023a3..5733bdedc 100644 --- a/supernode/httpclient/origin_http_client.go +++ b/supernode/httpclient/origin_http_client.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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 httpclient import ( diff --git a/supernode/server/0.3_bridge.go b/supernode/server/0.3_bridge.go index ff14a0730..aaf37e5db 100644 --- a/supernode/server/0.3_bridge.go +++ b/supernode/server/0.3_bridge.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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/supernode/server/handler.go b/supernode/server/handler.go index ffc8c0972..d55b84902 100644 --- a/supernode/server/handler.go +++ b/supernode/server/handler.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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/supernode/server/metrics.go b/supernode/server/metrics.go index 0ac4e4019..da0b70850 100644 --- a/supernode/server/metrics.go +++ b/supernode/server/metrics.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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/supernode/server/peer_bridge.go b/supernode/server/peer_bridge.go index 543f0ab28..f498198f1 100644 --- a/supernode/server/peer_bridge.go +++ b/supernode/server/peer_bridge.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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/supernode/server/result_info.go b/supernode/server/result_info.go index 37f4c63b5..cf1b657dc 100644 --- a/supernode/server/result_info.go +++ b/supernode/server/result_info.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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/supernode/server/router.go b/supernode/server/router.go index e3ddd3985..6f9f99440 100644 --- a/supernode/server/router.go +++ b/supernode/server/router.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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/supernode/server/router_test.go b/supernode/server/router_test.go index ec3a03a45..3c176e48f 100644 --- a/supernode/server/router_test.go +++ b/supernode/server/router_test.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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/supernode/server/server.go b/supernode/server/server.go index 94993fde6..90ed89202 100644 --- a/supernode/server/server.go +++ b/supernode/server/server.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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/supernode/server/system_bridge.go b/supernode/server/system_bridge.go index ae2462827..4cfdbafe8 100644 --- a/supernode/server/system_bridge.go +++ b/supernode/server/system_bridge.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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/test/api_metrics_test.go b/test/api_metrics_test.go index 1554a84d4..09040de63 100644 --- a/test/api_metrics_test.go +++ b/test/api_metrics_test.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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 main import ( diff --git a/test/api_ping_test.go b/test/api_ping_test.go index 1c5bd63a7..77836cb83 100644 --- a/test/api_ping_test.go +++ b/test/api_ping_test.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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 main import ( diff --git a/test/environment/env.go b/test/environment/env.go index 21af1e817..4f995a80c 100644 --- a/test/environment/env.go +++ b/test/environment/env.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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 environment import ( diff --git a/test/main_test.go b/test/main_test.go index adca6883c..5f5e408a6 100644 --- a/test/main_test.go +++ b/test/main_test.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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 main import ( diff --git a/test/request/request.go b/test/request/request.go index 38dcc23f0..a90fb6a98 100644 --- a/test/request/request.go +++ b/test/request/request.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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 request import ( diff --git a/test/util_api.go b/test/util_api.go index ccd6a9851..a4d4d1e72 100644 --- a/test/util_api.go +++ b/test/util_api.go @@ -1,3 +1,19 @@ +/* + * Copyright The Dragonfly 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 main import (