Skip to content

Commit

Permalink
Typo
Browse files Browse the repository at this point in the history
Signed-off-by: Yuri Shkuro <ys@uber.com>
  • Loading branch information
Yuri Shkuro committed Oct 24, 2017
1 parent 45f377d commit cdce79b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/query/app/static_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,18 @@ func loadUIConfig(uiConfig string) (map[string]interface{}, error) {
}

var c map[string]interface{}
var unmarshall func([]byte, interface{}) error
var unmarshal func([]byte, interface{}) error

switch strings.ToLower(ext) {
case ".yaml", ".yml":
unmarshall = yaml.Unmarshal
unmarshal = yaml.Unmarshal
case ".json":
unmarshall = json.Unmarshal
unmarshal = json.Unmarshal
default:
return nil, fmt.Errorf("Unrecognized UI config file format %v", uiConfig)
}

if err := unmarshall(bytes, &c); err != nil {
if err := unmarshal(bytes, &c); err != nil {
return nil, errors.Wrapf(err, "Cannot parse UI config file %v", uiConfig)
}
return c, nil
Expand Down

0 comments on commit cdce79b

Please sign in to comment.