File tree Expand file tree Collapse file tree 22 files changed +49
-48
lines changed
bindings/cloudflare/queues Expand file tree Collapse file tree 22 files changed +49
-48
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ require (
9
9
github.com/invopop/jsonschema v0.6.0
10
10
github.com/spf13/cobra v1.6.1
11
11
github.com/xeipuuv/gojsonschema v1.2.1-0.20201027075954-b076d39a02e5
12
- golang.org/x/exp v0.0.0-20231006140011-7918f672742d
13
12
gopkg.in/yaml.v3 v3.0.1
14
13
sigs.k8s.io/yaml v1.4.0
15
14
)
Original file line number Diff line number Diff line change @@ -45,8 +45,6 @@ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHo
45
45
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 /go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ =
46
46
github.com/xeipuuv/gojsonschema v1.2.1-0.20201027075954-b076d39a02e5 h1:ImnGIsrcG8vwbovhYvvSY8fagVV6QhCWSWXfzwGDLVs =
47
47
github.com/xeipuuv/gojsonschema v1.2.1-0.20201027075954-b076d39a02e5 /go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y =
48
- golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI =
49
- golang.org/x/exp v0.0.0-20231006140011-7918f672742d /go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo =
50
48
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 /go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0 =
51
49
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU =
52
50
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f /go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0 =
Original file line number Diff line number Diff line change @@ -16,10 +16,9 @@ package metadataschema
16
16
import (
17
17
"errors"
18
18
"fmt"
19
+ "slices"
19
20
"strings"
20
21
21
- "golang.org/x/exp/slices"
22
-
23
22
mdutils "github.com/dapr/components-contrib/metadata"
24
23
)
25
24
Original file line number Diff line number Diff line change @@ -131,6 +131,8 @@ linters-settings:
131
131
desc : " must use context"
132
132
- pkg : " github.com/pkg/errors"
133
133
desc : " must use standard library (errors package and/or fmt.Errorf)"
134
+ - pkg : " golang.org/x/exp/slices"
135
+ desc : " must use slices from standard library"
134
136
- pkg : " github.com/go-chi/chi$"
135
137
desc : " must use github.com/go-chi/chi/v5"
136
138
- pkg : " github.com/cenkalti/backoff$"
Original file line number Diff line number Diff line change @@ -20,10 +20,9 @@ import (
20
20
"io"
21
21
"net/http"
22
22
"reflect"
23
+ "slices"
23
24
"strconv"
24
25
25
- "golang.org/x/exp/slices"
26
-
27
26
"github.com/dapr/components-contrib/bindings"
28
27
"github.com/dapr/components-contrib/common/component/cloudflare/workers"
29
28
contribMetadata "github.com/dapr/components-contrib/metadata"
Original file line number Diff line number Diff line change
1
+ /*
2
+ Copyright 2023 The Dapr Authors
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+ http://www.apache.org/licenses/LICENSE-2.0
7
+ Unless required by applicable law or agreed to in writing, software
8
+ distributed under the License is distributed on an "AS IS" BASIS,
9
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ See the License for the specific language governing permissions and
11
+ limitations under the License.
12
+ */
13
+
14
+ package features
15
+
16
+ import (
17
+ "slices"
18
+ )
19
+
20
+ // Feature is a generic type for features supported by components.
21
+ type Feature [T any ] string
22
+
23
+ // IsPresent checks if a given feature is present in the list.
24
+ func (f Feature [T ]) IsPresent (features []Feature [T ]) bool {
25
+ return slices .Contains (features , f )
26
+ }
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import (
20
20
"fmt"
21
21
"reflect"
22
22
"regexp"
23
+ "slices"
23
24
"strconv"
24
25
"strings"
25
26
"sync"
@@ -28,7 +29,6 @@ import (
28
29
"github.com/jackc/pgx/v5"
29
30
"github.com/jackc/pgx/v5/pgconn"
30
31
"github.com/jackc/pgx/v5/pgxpool"
31
- "golang.org/x/exp/slices"
32
32
33
33
"github.com/dapr/components-contrib/configuration"
34
34
contribMetadata "github.com/dapr/components-contrib/metadata"
Original file line number Diff line number Diff line change @@ -14,13 +14,8 @@ limitations under the License.
14
14
package crypto
15
15
16
16
import (
17
- "golang.org/x/exp/slices "
17
+ "github.com/dapr/components-contrib/common/features "
18
18
)
19
19
20
20
// Feature names a feature that can be implemented by the crypto provider components.
21
- type Feature string
22
-
23
- // IsPresent checks if a given feature is present in the list.
24
- func (f Feature ) IsPresent (features []Feature ) bool {
25
- return slices .Contains (features , f )
26
- }
21
+ type Feature = features.Feature [SubtleCrypto ]
Original file line number Diff line number Diff line change @@ -15,10 +15,10 @@ package crypto
15
15
16
16
import (
17
17
"encoding/json"
18
+ "slices"
18
19
"time"
19
20
20
21
"github.com/lestrrat-go/jwx/v2/jwk"
21
- "golang.org/x/exp/slices"
22
22
)
23
23
24
24
// Key extends jwk.Key adding optional properties for determining if the key is valid (time bounds) or can be used for certain purposes.
Original file line number Diff line number Diff line change @@ -24,12 +24,12 @@ import (
24
24
"net/http"
25
25
"net/textproto"
26
26
"reflect"
27
+ "slices"
27
28
"strconv"
28
29
"strings"
29
30
"time"
30
31
31
32
"github.com/open-policy-agent/opa/rego"
32
- "golang.org/x/exp/slices"
33
33
34
34
"github.com/dapr/components-contrib/common/httputils"
35
35
contribMetadata "github.com/dapr/components-contrib/metadata"
You can’t perform that action at this time.
0 commit comments