Skip to content

Commit

Permalink
Merge pull request #22 from ythadhani/optimized-diff
Browse files Browse the repository at this point in the history
Optimized Diff
  • Loading branch information
ythadhani authored Mar 28, 2023
2 parents ae98cc0 + 2d0b152 commit ca8e702
Show file tree
Hide file tree
Showing 127 changed files with 272,863 additions and 180,853 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,6 @@ jobs:
run: |
checkstr=""
for i in util ygot ygen ytypes ygot/pathtranslate testutil testcmp ypathgen; do
checkstr="$checkstr github.com/openconfig/ygot/$i"
checkstr="$checkstr github.com/openconfig/ygot/$i/..."
done
staticcheck $checkstr
6 changes: 3 additions & 3 deletions demo/getting_started/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func main() {
i.Description = ygot.String("An Interface")

// We can then validate the contents of the interface that we created.
if err := d.Interface["eth0"].Validate(); err != nil {
if err := d.Interface["eth0"].ΛValidate(); err != nil {
panic(fmt.Sprintf("Interface validation failed: %v", err))
}

Expand Down Expand Up @@ -115,14 +115,14 @@ func main() {
}
ygot.BuildEmptyTree(subif)
_, err = subif.Ipv4.NewAddress("Not a valid address")
if err := invalidIf.Validate(); err == nil {
if err := invalidIf.ΛValidate(); err == nil {
panic(fmt.Sprintf("Did not find invalid address, got nil err: %v", err))
} else {
fmt.Printf("Got expected error: %v\n", err)
}

// We can also validate the device overall.
if err := d.Validate(); err != nil {
if err := d.ΛValidate(); err != nil {
panic(fmt.Sprintf("Device validation failed: %v", err))
}

Expand Down
108,251 changes: 65,454 additions & 42,797 deletions exampleoc/oc.go

Large diffs are not rendered by default.

Loading

0 comments on commit ca8e702

Please sign in to comment.