Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 2 additions & 26 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,7 @@ on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:

build:
name: Build
runs-on: ubuntu-latest
strategy:
fail-fast: false

steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
# Use default go version so that we don't have to update it every time a new one comes out.
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Get dependencies
run: |
go get -v -t -d ./...

- name: Build
run: go build -v ./...

- name: Test
run: go test -v ./...
go:
uses: openconfig/common-ci/.github/workflows/basic_go.yml@c2294c3c86c90e75e58c24a40d6f7f3364bbae9d
15 changes: 13 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
module github.com/openconfig/pattern-regex-tests

go 1.15
go 1.19

require (
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
github.com/google/go-cmp v0.5.0
github.com/openconfig/gnmi v0.0.0-20201217212801-57b8e7af2d36 // indirect
github.com/openconfig/goyang v0.2.4
github.com/openconfig/ygot v0.9.0
)

require (
github.com/golang/protobuf v1.4.3 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/openconfig/gnmi v0.0.0-20201217212801-57b8e7af2d36 // indirect
golang.org/x/net v0.0.0-20201209123823-ac852fbbde11 // indirect
golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e // indirect
golang.org/x/text v0.3.4 // indirect
google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d // indirect
google.golang.org/grpc v1.34.0 // indirect
google.golang.org/protobuf v1.25.0 // indirect
)
1 change: 0 additions & 1 deletion go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ github.com/openconfig/goyang v0.2.4/go.mod h1:vX61x01Q46AzbZUzG617vWqh/cB+aisc+R
github.com/openconfig/ygot v0.6.0/go.mod h1:o30svNf7O0xK+R35tlx95odkDmZWS9JyWWQSmIhqwAs=
github.com/openconfig/ygot v0.9.0 h1:as0Hi27+tii4dnT1Namxrba+UVgMTn4eElQ08a6DtF4=
github.com/openconfig/ygot v0.9.0/go.mod h1:oCQNdXnv7dWc8scTDgoFkauv1wwplJn5HspHcjlxSAQ=
github.com/pborman/getopt v0.0.0-20190409184431-ee0cd42419d3 h1:YtFkrqsMEj7YqpIhRteVxJxCeC3jJBieuLr0d4C4rSA=
github.com/pborman/getopt v0.0.0-20190409184431-ee0cd42419d3/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
Expand Down
12 changes: 0 additions & 12 deletions gotests/patterncheck/patterncheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,6 @@ var (
failCaseExt = regexp.MustCompile(`\w+:pattern-test-fail`)
)

// YANGLeaf is a structure used to describe a particular leaf of YANG schema.
type YANGLeaf struct {
module string
name string
}

// RegexpTest specifies a test case for a particular regular expression check.
type RegexpTest struct {
inData string
wantMatch bool
}

// CheckRegexps tests mock input data against a set of leaves that have pattern
// test cases specified for them. It ensures that the regexp compiles as a
// POSIX regular expression according to the OpenConfig style guide.
Expand Down