diff options
author | Rastislav Szabo <raszabo@cisco.com> | 2017-05-22 13:59:34 +0200 |
---|---|---|
committer | Rastislav Szabo <raszabo@cisco.com> | 2017-05-22 14:00:46 +0200 |
commit | c38cb25d746736f062ee16e87f553c8a4ec5fced (patch) | |
tree | 231a1befaff3b83b020461e584e9de27a39d06a4 /examples | |
parent | c60a4ee4e6114ff0dc3cbc9fd9a58321ca2a8abc (diff) |
binapi-generator renamed & moved, finished documentation
Change-Id: I7d3b53fa238e822b36a6a82c61ffb792da3898bf
Signed-off-by: Rastislav Szabo <raszabo@cisco.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/example_client.go | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/examples/example_client.go b/examples/example_client.go index 6030469..f2e5804 100644 --- a/examples/example_client.go +++ b/examples/example_client.go @@ -16,7 +16,7 @@ package main // Generates Go bindings for all VPP APIs located in the json directory. -//go:generate binapi_generator --input-dir=bin_api --output-dir=bin_api +//go:generate binapi-generator --input-dir=bin_api --output-dir=bin_api import ( "fmt" @@ -36,11 +36,20 @@ import ( func main() { fmt.Println("Starting example VPP client...") - // connect to VPP and create an API channel that will be used in the examples - conn, _ := govpp.Connect() + // connect to VPP + conn, err := govpp.Connect() + if err != nil { + fmt.Println("Error:", err) + os.Exit(1) + } defer conn.Disconnect() - ch, _ := conn.NewAPIChannel() + // create an API channel that will be used in the examples + ch, err := conn.NewAPIChannel() + if err != nil { + fmt.Println("Error:", err) + os.Exit(1) + } defer ch.Close() // check whether the VPP supports our version of some messages |