mirror of
https://github.com/eosswedenorg/antelope-api-healthcheck
synced 2026-06-18 05:00:03 +02:00
src/parse_request.go: linter does not like capitalized error strings.
This commit is contained in:
parent
bc6f857c1e
commit
f77edfe321
2 changed files with 4 additions and 4 deletions
|
|
@ -46,7 +46,7 @@ func ParseRequest(request string) (api.ApiInterface, error) {
|
|||
p := strings.Split(strings.TrimSpace(request), "|")
|
||||
|
||||
if len(p) < 2 {
|
||||
return nil, fmt.Errorf("Invalid number of parameters in agent request")
|
||||
return nil, fmt.Errorf("invalid number of parameters in agent request")
|
||||
}
|
||||
|
||||
a := ParseArguments(p[1:])
|
||||
|
|
@ -62,5 +62,5 @@ func ParseRequest(request string) (api.ApiInterface, error) {
|
|||
return api.NewDebugApi(a.url), nil
|
||||
}
|
||||
|
||||
return nil, fmt.Errorf("Invalid API '%s'", p[0])
|
||||
return nil, fmt.Errorf("invalid API '%s'", p[0])
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ func TestParseWithInvalidApi(t *testing.T) {
|
|||
|
||||
api, err := ParseRequest("invalid|http://api.example.com")
|
||||
assert.Error(t, err)
|
||||
assert.Equal(t, err.Error(), "Invalid API 'invalid'")
|
||||
assert.Equal(t, err.Error(), "invalid API 'invalid'")
|
||||
assert.Nil(t, api)
|
||||
}
|
||||
|
||||
|
|
@ -20,7 +20,7 @@ func TestParseWithInvalidParams(t *testing.T) {
|
|||
|
||||
api, err := ParseRequest("v1")
|
||||
assert.Error(t, err)
|
||||
assert.Equal(t, err.Error(), "Invalid number of parameters in agent request")
|
||||
assert.Equal(t, err.Error(), "invalid number of parameters in agent request")
|
||||
assert.Nil(t, api)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue