rpc: golint fixes

This commit is contained in:
Kiel barry 2018-07-09 12:11:24 -07:00
parent 4b59ff0a79
commit d6093e3101
2 changed files with 3 additions and 4 deletions

View file

@ -275,9 +275,8 @@ func parseBatchRequest(incomingMsg json.RawMessage) ([]rpcRequest, bool, Error)
func (c *jsonCodec) ParseRequestArguments(argTypes []reflect.Type, params interface{}) ([]reflect.Value, Error) { func (c *jsonCodec) ParseRequestArguments(argTypes []reflect.Type, params interface{}) ([]reflect.Value, Error) {
if args, ok := params.(json.RawMessage); !ok { if args, ok := params.(json.RawMessage); !ok {
return nil, &invalidParamsError{"Invalid params supplied"} return nil, &invalidParamsError{"Invalid params supplied"}
} else {
return parsePositionalArguments(args, argTypes)
} }
return parsePositionalArguments(args, argTypes)
} }
// parsePositionalArguments tries to parse the given args to an array of values with the // parsePositionalArguments tries to parse the given args to an array of values with the

View file

@ -59,8 +59,8 @@ func (s *Service) Rets() (string, error) {
return "", nil return "", nil
} }
func (s *Service) InvalidRets1() (error, string) { func (s *Service) InvalidRets1() (string, error) {
return nil, "" return "", nil
} }
func (s *Service) InvalidRets2() (string, string) { func (s *Service) InvalidRets2() (string, string) {