Skip to content

Commit

Permalink
Merge pull request #30 from TencentBlueKing/develop
Browse files Browse the repository at this point in the history
v1.0.8
  • Loading branch information
wklken authored Jan 23, 2022
2 parents 1316f9a + 1fc4b77 commit 6bf264d
Show file tree
Hide file tree
Showing 57 changed files with 1,003 additions and 71 deletions.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: dep lint test godoc
.PHONY: dep lint test bench godoc

dep:
go mod tidy
Expand All @@ -11,6 +11,9 @@ test:
go test -mod=vendor -gcflags=all=-l $(shell go list ./... | grep -v mock | grep -v docs) -covermode=count -coverprofile .coverage.cov
go tool cover -func=.coverage.cov

bench:
go test -run=nonthingplease -benchmem -bench=. $(shell go list ./... | grep -v /vendor/)

godoc:
echo "http://127.0.0.1:6060"
godoc -http=127.0.0.1:6060 -goroot="."
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.7
1.0.8
2 changes: 1 addition & 1 deletion cache/cache_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cache_test
import (
"testing"

. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

Expand Down
2 changes: 1 addition & 1 deletion cache/key.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* TencentBlueKing is pleased to support the open source community by making
* 蓝鲸智云-gopkg available.
* Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
* Copyright (C) 2017-2022 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://opensource.org/licenses/MIT
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
Expand Down
4 changes: 2 additions & 2 deletions cache/key_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* TencentBlueKing is pleased to support the open source community by making
* 蓝鲸智云-gopkg available.
* Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
* Copyright (C) 2017-2022 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://opensource.org/licenses/MIT
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
Expand All @@ -12,7 +12,7 @@
package cache

import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
"github.com/stretchr/testify/assert"
)

Expand Down
4 changes: 2 additions & 2 deletions cache/memory/backend/backend_suite_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* TencentBlueKing is pleased to support the open source community by making
* 蓝鲸智云-gopkg available.
* Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
* Copyright (C) 2017-2022 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://opensource.org/licenses/MIT
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
Expand All @@ -14,7 +14,7 @@ package backend_test
import (
"testing"

. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

Expand Down
2 changes: 1 addition & 1 deletion cache/memory/backend/memory.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* TencentBlueKing is pleased to support the open source community by making
* 蓝鲸智云-gopkg available.
* Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
* Copyright (C) 2017-2022 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://opensource.org/licenses/MIT
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
Expand Down
4 changes: 2 additions & 2 deletions cache/memory/backend/memory_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* TencentBlueKing is pleased to support the open source community by making
* 蓝鲸智云-gopkg available.
* Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
* Copyright (C) 2017-2022 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://opensource.org/licenses/MIT
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
Expand All @@ -15,7 +15,7 @@ import (
"math/rand"
"time"

. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion cache/memory/backend/types.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* TencentBlueKing is pleased to support the open source community by making
* 蓝鲸智云-gopkg available.
* Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
* Copyright (C) 2017-2022 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://opensource.org/licenses/MIT
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
Expand Down
2 changes: 1 addition & 1 deletion cache/memory/base_cache.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* TencentBlueKing is pleased to support the open source community by making
* 蓝鲸智云-gopkg available.
* Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
* Copyright (C) 2017-2022 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://opensource.org/licenses/MIT
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
Expand Down
4 changes: 2 additions & 2 deletions cache/memory/base_cache_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* TencentBlueKing is pleased to support the open source community by making
* 蓝鲸智云-gopkg available.
* Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
* Copyright (C) 2017-2022 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://opensource.org/licenses/MIT
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
Expand All @@ -15,7 +15,7 @@ import (
"errors"
"time"

. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
"github.com/stretchr/testify/assert"

"github.com/TencentBlueKing/gopkg/cache"
Expand Down
2 changes: 1 addition & 1 deletion cache/memory/cache.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* TencentBlueKing is pleased to support the open source community by making
* 蓝鲸智云-gopkg available.
* Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
* Copyright (C) 2017-2022 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://opensource.org/licenses/MIT
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
Expand Down
4 changes: 2 additions & 2 deletions cache/memory/cache_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* TencentBlueKing is pleased to support the open source community by making
* 蓝鲸智云-gopkg available.
* Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
* Copyright (C) 2017-2022 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://opensource.org/licenses/MIT
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
Expand All @@ -14,7 +14,7 @@ package memory
import (
"time"

. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
"github.com/stretchr/testify/assert"

"github.com/TencentBlueKing/gopkg/cache"
Expand Down
4 changes: 2 additions & 2 deletions cache/memory/memory_suite_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* TencentBlueKing is pleased to support the open source community by making
* 蓝鲸智云-gopkg available.
* Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
* Copyright (C) 2017-2022 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://opensource.org/licenses/MIT
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
Expand All @@ -14,7 +14,7 @@ package memory_test
import (
"testing"

. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

Expand Down
2 changes: 1 addition & 1 deletion cache/memory/types.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* TencentBlueKing is pleased to support the open source community by making
* 蓝鲸智云-gopkg available.
* Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
* Copyright (C) 2017-2022 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://opensource.org/licenses/MIT
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
Expand Down
2 changes: 1 addition & 1 deletion collection/set/int64.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* TencentBlueKing is pleased to support the open source community by making
* 蓝鲸智云-gopkg available.
* Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
* Copyright (C) 2017-2022 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://opensource.org/licenses/MIT
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
Expand Down
6 changes: 3 additions & 3 deletions collection/set/int64_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* TencentBlueKing is pleased to support the open source community by making
* 蓝鲸智云-gopkg available.
* Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
* Copyright (C) 2017-2022 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://opensource.org/licenses/MIT
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
Expand All @@ -12,7 +12,7 @@
package set_test

import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
"github.com/stretchr/testify/assert"

"github.com/TencentBlueKing/gopkg/collection/set"
Expand All @@ -26,7 +26,7 @@ var _ = Describe("Int64", func() {
})

It("NewInt64Set", func() {
//s := util.NewInt64Set()
// s := util.NewInt64Set()
assert.Len(GinkgoT(), s.Data, 0)
assert.Equal(GinkgoT(), 0, s.Size())
})
Expand Down
4 changes: 2 additions & 2 deletions collection/set/set_suite_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* TencentBlueKing is pleased to support the open source community by making
* 蓝鲸智云-gopkg available.
* Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
* Copyright (C) 2017-2022 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://opensource.org/licenses/MIT
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
Expand All @@ -14,7 +14,7 @@ package set_test
import (
"testing"

. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

Expand Down
2 changes: 1 addition & 1 deletion collection/set/string.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* TencentBlueKing is pleased to support the open source community by making
* 蓝鲸智云-gopkg available.
* Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
* Copyright (C) 2017-2022 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://opensource.org/licenses/MIT
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
Expand Down
6 changes: 3 additions & 3 deletions collection/set/string_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* TencentBlueKing is pleased to support the open source community by making
* 蓝鲸智云-gopkg available.
* Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
* Copyright (C) 2017-2022 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://opensource.org/licenses/MIT
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
Expand All @@ -12,7 +12,7 @@
package set_test

import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
"github.com/stretchr/testify/assert"

"github.com/TencentBlueKing/gopkg/collection/set"
Expand Down Expand Up @@ -97,7 +97,7 @@ var _ = Describe("String Set", func() {
s2 := s.ToString(",")

isEqual := s2 == "hello,world" || s2 == "world,hello"
//assert.Equal(GinkgoT(), "hello,world", s2)
// assert.Equal(GinkgoT(), "hello,world", s2)
assert.True(GinkgoT(), isEqual)

})
Expand Down
4 changes: 2 additions & 2 deletions conv/conv_suite_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* TencentBlueKing is pleased to support the open source community by making
* 蓝鲸智云-gopkg available.
* Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
* Copyright (C) 2017-2022 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://opensource.org/licenses/MIT
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
Expand All @@ -14,7 +14,7 @@ package conv_test
import (
"testing"

. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

Expand Down
2 changes: 1 addition & 1 deletion conv/int64.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* TencentBlueKing is pleased to support the open source community by making
* 蓝鲸智云-gopkg available.
* Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
* Copyright (C) 2017-2022 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://opensource.org/licenses/MIT
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
Expand Down
5 changes: 2 additions & 3 deletions conv/int64_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* TencentBlueKing is pleased to support the open source community by making
* 蓝鲸智云-gopkg available.
* Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
* Copyright (C) 2017-2022 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://opensource.org/licenses/MIT
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
Expand All @@ -13,8 +13,7 @@ package conv_test

import (
"github.com/TencentBlueKing/gopkg/conv"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/extensions/table"
. "github.com/onsi/ginkgo/v2"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion conv/slice.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* TencentBlueKing is pleased to support the open source community by making
* 蓝鲸智云-gopkg available.
* Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
* Copyright (C) 2017-2022 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://opensource.org/licenses/MIT
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
Expand Down
5 changes: 2 additions & 3 deletions conv/slice_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* TencentBlueKing is pleased to support the open source community by making
* 蓝鲸智云-gopkg available.
* Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
* Copyright (C) 2017-2022 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://opensource.org/licenses/MIT
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
Expand All @@ -13,8 +13,7 @@ package conv_test

import (
"github.com/TencentBlueKing/gopkg/conv"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/extensions/table"
. "github.com/onsi/ginkgo/v2"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion conv/string.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* TencentBlueKing is pleased to support the open source community by making
* 蓝鲸智云-gopkg available.
* Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
* Copyright (C) 2017-2022 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://opensource.org/licenses/MIT
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
Expand Down
5 changes: 2 additions & 3 deletions conv/string_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* TencentBlueKing is pleased to support the open source community by making
* 蓝鲸智云-gopkg available.
* Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
* Copyright (C) 2017-2022 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://opensource.org/licenses/MIT
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
Expand All @@ -17,8 +17,7 @@ import (
"testing"

"github.com/TencentBlueKing/gopkg/conv"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/extensions/table"
. "github.com/onsi/ginkgo/v2"
"github.com/stretchr/testify/assert"
)

Expand Down
Loading

0 comments on commit 6bf264d

Please sign in to comment.