From d2ee7015a3a10f59096e6d99c9722be7a27ac5e0 Mon Sep 17 00:00:00 2001 From: hookokoko Date: Fri, 3 Nov 2023 13:06:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0license=E6=8E=92=E9=99=A4?= =?UTF-8?q?=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .licenserc.json | 6 +++++- pkg/iterator/iterator.go | 14 ++++++++++++++ pkg/iterator/iterator_test.go | 14 ++++++++++++++ pkg/iterator/type.go | 14 ++++++++++++++ task_test.go | 20 +++++++++++++++++--- 5 files changed, 64 insertions(+), 4 deletions(-) diff --git a/.licenserc.json b/.licenserc.json index 87cb298..82842ab 100644 --- a/.licenserc.json +++ b/.licenserc.json @@ -1,5 +1,9 @@ { "**/*.go": "// Copyright 2021 ecodeclub", "**/*.{yml}": "# Copyright 2021 ecodeclub", - "**/*.sh": "# Copyright 2021 ecodeclub" + "**/*.sh": "# Copyright 2021 ecodeclub", + + "ignore": [ + "**/mocks" + ] } \ No newline at end of file diff --git a/pkg/iterator/iterator.go b/pkg/iterator/iterator.go index f4e796f..40f8981 100644 --- a/pkg/iterator/iterator.go +++ b/pkg/iterator/iterator.go @@ -1,3 +1,17 @@ +// Copyright 2021 ecodeclub +// +// 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 iterator type ListIter[T []E, E any] struct { diff --git a/pkg/iterator/iterator_test.go b/pkg/iterator/iterator_test.go index bc67cbf..154b3cf 100644 --- a/pkg/iterator/iterator_test.go +++ b/pkg/iterator/iterator_test.go @@ -1,3 +1,17 @@ +// Copyright 2021 ecodeclub +// +// 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 iterator import ( diff --git a/pkg/iterator/type.go b/pkg/iterator/type.go index 827a27e..f9e99f3 100644 --- a/pkg/iterator/type.go +++ b/pkg/iterator/type.go @@ -1,3 +1,17 @@ +// Copyright 2021 ecodeclub +// +// 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 iterator type Iterable[T any] interface { diff --git a/task_test.go b/task_test.go index 0d4172f..b41a673 100644 --- a/task_test.go +++ b/task_test.go @@ -1,3 +1,17 @@ +// Copyright 2021 ecodeclub +// +// 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 notify_go import ( @@ -16,7 +30,7 @@ import ( /* 测试场景: 1. 调用一次:超时、不超时没有返回error、不超时返回error -2. 并发调用多次:一般不存在这种场景, 同一个TrigerTask只会调用一次, 不同的task间并发安全 +2. 并发调用多次:一般不存在这种场景, 同一个TriggerTask只会调用一次, 不同的task间并发安全 */ func TestTriggerTask_Send(t *testing.T) { t.Parallel() @@ -141,7 +155,7 @@ func TestCircleTask_fillCronTimes(t *testing.T) { want []time.Time }{ { - name: "every minute, 历史时间全部被过滤", + name: "every minute 历史时间全部被过滤", args: args{ expr: "* * * * *", begin: func() time.Time { @@ -190,7 +204,7 @@ func TestCircleTask_fillCronTimes(t *testing.T) { }(), }, { - name: "every minte", + name: "every minute", args: args{ expr: "* * * * *", begin: func() time.Time {