Skip to content

Commit

Permalink
minor lint changes
Browse files Browse the repository at this point in the history
Signed-off-by: Vivek Singh <[email protected]>
  • Loading branch information
Vivek Singh committed Mar 30, 2020
1 parent 781779f commit 4f4922b
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions components/infra-proxy-service/server/databags.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ func (s *Server) GetDataBags(ctx context.Context, req *request.DataBags) (*respo

if req.Name != "" {
dataBags, err := client.DataBags.ListItems(req.Name)

if err != nil {
return nil, status.Error(codes.InvalidArgument, err.Error())
}
Expand All @@ -32,18 +31,16 @@ func (s *Server) GetDataBags(ctx context.Context, req *request.DataBags) (*respo
DataBags: fromAPIToListDatabags(*dataBags),
}, nil

} else {

dataBags, err := client.DataBags.List()

if err != nil {
return nil, status.Error(codes.InvalidArgument, err.Error())
}
}

return &response.DataBags{
DataBags: fromAPIToListDatabags(*dataBags),
}, nil
dataBags, err := client.DataBags.List()
if err != nil {
return nil, status.Error(codes.InvalidArgument, err.Error())
}

return &response.DataBags{
DataBags: fromAPIToListDatabags(*dataBags),
}, nil
}

// GetDataBagItem get data bag
Expand Down

0 comments on commit 4f4922b

Please sign in to comment.