From 7e512efe1c52b022639a07950676971f40e69b03 Mon Sep 17 00:00:00 2001 From: Wen Bo Li <50884368+wenovus@users.noreply.github.com> Date: Mon, 17 Oct 2022 15:33:49 -0700 Subject: [PATCH] =?UTF-8?q?Change=20demo=20code=20to=20use=20`Validate`=20?= =?UTF-8?q?instead=20of=20`=CE=9BValidate`=20(#738)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- demo/getting_started/interfaces.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/demo/getting_started/interfaces.go b/demo/getting_started/interfaces.go index 2434a216b..9891b5826 100644 --- a/demo/getting_started/interfaces.go +++ b/demo/getting_started/interfaces.go @@ -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)) } @@ -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)) }