Skip to content

Commit

Permalink
linter says parseJson should be parseJSON. i comply
Browse files Browse the repository at this point in the history
  • Loading branch information
colindickson committed May 19, 2019
1 parent 85ea94a commit ac6b583
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions internal/tester/variables.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func parseOutputs(runner *Runner, contract *Contract, body []byte) (err error) {
if len(s) > 1 {
switch strings.ToLower(s[0]) {
case "json":
result, err = parseJson(value, s[1:], body)
result, err = parseJSON(value, s[1:], body)
if err != nil {
return
}
Expand All @@ -109,7 +109,7 @@ func parseOutputs(runner *Runner, contract *Contract, body []byte) (err error) {
return nil
}

func parseJson(format string, fields []string, body []byte) (value string, err error) {
func parseJSON(format string, fields []string, body []byte) (value string, err error) {
if body == nil || fields == nil || len(fields) == 0 {
return "", fmt.Errorf("bad parameter")
}
Expand Down
2 changes: 1 addition & 1 deletion internal/tester/variables_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ var jsonParserTests = []struct {

func TestJsonParser(t *testing.T) {
for _, tt := range jsonParserTests {
v, err := parseJson(tt.conf, tt.keys, []byte(tt.json))
v, err := parseJSON(tt.conf, tt.keys, []byte(tt.json))

assert.True(t, (err != nil) == tt.expectedError, tt.description)
assert.Equal(t, tt.expectedValue, v, tt.description)
Expand Down

0 comments on commit ac6b583

Please sign in to comment.