diff options
author | 2020-10-02 16:36:32 +0200 | |
---|---|---|
committer | 2020-10-02 16:36:32 +0200 | |
commit | c2456559a66107441addb96f673191bde09d6977 (patch) | |
tree | 30020a936849f78f432cf5b6fe0bbb0489e485b6 /binapi/gtpu/gtpu_rpc.ba.go | |
parent | f751f3f845ef56bbcdb873d81a1c6edbc5a87853 (diff) |
Check retval value and convert to error in generated RPC client code
Change-Id: I816b4802cb5fc46239f6db0480fa4cf3645fe2f0
Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
Diffstat (limited to 'binapi/gtpu/gtpu_rpc.ba.go')
-rw-r--r-- | binapi/gtpu/gtpu_rpc.ba.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/binapi/gtpu/gtpu_rpc.ba.go b/binapi/gtpu/gtpu_rpc.ba.go index d5f3263..46a7e7d 100644 --- a/binapi/gtpu/gtpu_rpc.ba.go +++ b/binapi/gtpu/gtpu_rpc.ba.go @@ -11,7 +11,7 @@ import ( vpe "git.fd.io/govpp.git/binapi/vpe" ) -// RPCService defines RPC service gtpu. +// RPCService defines RPC service gtpu. type RPCService interface { GtpuAddDelTunnel(ctx context.Context, in *GtpuAddDelTunnel) (*GtpuAddDelTunnelReply, error) GtpuOffloadRx(ctx context.Context, in *GtpuOffloadRx) (*GtpuOffloadRxReply, error) @@ -33,7 +33,7 @@ func (c *serviceClient) GtpuAddDelTunnel(ctx context.Context, in *GtpuAddDelTunn if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } func (c *serviceClient) GtpuOffloadRx(ctx context.Context, in *GtpuOffloadRx) (*GtpuOffloadRxReply, error) { @@ -42,7 +42,7 @@ func (c *serviceClient) GtpuOffloadRx(ctx context.Context, in *GtpuOffloadRx) (* if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } func (c *serviceClient) GtpuTunnelDump(ctx context.Context, in *GtpuTunnelDump) (RPCService_GtpuTunnelDumpClient, error) { @@ -90,5 +90,5 @@ func (c *serviceClient) SwInterfaceSetGtpuBypass(ctx context.Context, in *SwInte if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } |