diff options
Diffstat (limited to 'client/client.go')
-rw-r--r-- | client/client.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/client/client.go b/client/client.go index 734e7ec4..a2107637 100644 --- a/client/client.go +++ b/client/client.go @@ -143,6 +143,9 @@ func (cli *GoBGPClient) GetNeighbor(name string) (*config.Neighbor, error) { if err != nil { return nil, err } + if len(ns) == 0 { + return nil, fmt.Errorf("not found neighbor %s", name) + } return ns[0], nil } |