Skip to content

Commit 7ac0a2c

Browse files
committed
remove usage of go-pcre
1 parent b2a2437 commit 7ac0a2c

File tree

5 files changed

+1
-24
lines changed

5 files changed

+1
-24
lines changed

.goreleaser.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ builds:
2323
goarch:
2424
- amd64
2525
- '386'
26-
- arm
27-
- arm64
2826
ignore:
2927
- goos: darwin
3028
goarch: '386'

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ release:
2121
# GOOS=freebsd GOARCH=arm go build -o ./bin/${BINARY}_${VERSION}_freebsd_arm
2222
GOOS=linux GOARCH=386 go build -o ./bin/${BINARY}_${VERSION}_linux_386
2323
GOOS=linux GOARCH=amd64 go build -o ./bin/${BINARY}_${VERSION}_linux_amd64
24-
GOOS=linux GOARCH=arm go build -o ./bin/${BINARY}_${VERSION}_linux_arm
24+
# GOOS=linux GOARCH=arm go build -o ./bin/${BINARY}_${VERSION}_linux_arm
2525
# GOOS=openbsd GOARCH=386 go build -o ./bin/${BINARY}_${VERSION}_openbsd_386
2626
# GOOS=openbsd GOARCH=amd64 go build -o ./bin/${BINARY}_${VERSION}_openbsd_amd64
2727
# GOOS=solaris GOARCH=amd64 go build -o ./bin/${BINARY}_${VERSION}_solaris_amd64

chaossearch/resource_object_group.go

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,14 @@ package chaossearch
33
import (
44
"context"
55
"log"
6-
"fmt"
76
"regexp"
87
"terraform-provider-chaossearch/chaossearch/client"
98

109
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
1110
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
1211
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
13-
14-
"github.com/gijsbers/go-pcre"
1512
)
1613

17-
func stringIsValidPcre(i interface{}, k string) (warnings []string, errors []error) {
18-
v, ok := i.(string)
19-
if !ok {
20-
errors = append(errors, fmt.Errorf("expected type of %s to be string", k))
21-
return warnings, errors
22-
}
23-
24-
if _, err := pcre.Compile(v, 0); err != nil {
25-
errors = append(errors, fmt.Errorf("%q: %s", k, err))
26-
}
27-
28-
return warnings, errors
29-
}
30-
3114
func resourceObjectGroup() *schema.Resource {
3215
return &schema.Resource{
3316
CreateContext: resourceObjectGroupCreate,
@@ -87,7 +70,6 @@ func resourceObjectGroup() *schema.Resource {
8770
Default: ".*",
8871
Optional: true,
8972
ForceNew: true,
90-
ValidateFunc: stringIsValidPcre,
9173
},
9274

9375
// Workaround. Otherwise Terraform fails with "All fields are ForceNew or Computed w/out Optional, Update is superfluous"

go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ go 1.14
55
require (
66
github.com/antihax/optional v1.0.0
77
github.com/aws/aws-sdk-go v1.25.3
8-
github.com/gijsbers/go-pcre v0.0.0-20161214203829-a84f3096ab3c
98
github.com/hashicorp/terraform-plugin-sdk/v2 v2.2.0
109
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b // indirect
1110
golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58

go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m
7373
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
7474
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
7575
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc=
76-
github.com/gijsbers/go-pcre v0.0.0-20161214203829-a84f3096ab3c h1:o5z/Stj4aWUiDiCVFdEOgXcwNF+Z7mQSlvDTaWBK98Q=
77-
github.com/gijsbers/go-pcre v0.0.0-20161214203829-a84f3096ab3c/go.mod h1:Bd83Kcti1U5OMXYYTjilhd6os+l6AmlTMVbDtaBvycQ=
7876
github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0=
7977
github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E=
8078
github.com/go-git/go-billy/v5 v5.0.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0=

0 commit comments

Comments
 (0)