Skip to content

Commit

Permalink
run gofmt
Browse files Browse the repository at this point in the history
  • Loading branch information
rwynn committed Jul 26, 2020
1 parent 540b730 commit 73621e1
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions monstache.go
Original file line number Diff line number Diff line change
Expand Up @@ -2544,17 +2544,17 @@ func (config *configOptions) loadEnvironment() *configOptions {
}

func (config *configOptions) loadVariableValueFromFile(name string, path string) (n string, v string, err error) {
name = strings.TrimSuffix(name, "__FILE")
f, err := os.Open(path)
if err != nil {
return name, "", fmt.Errorf("read value for %s from file failed: %s", name, err)
}
defer f.Close()
c, err := ioutil.ReadAll(f)
if err != nil {
return name, "", fmt.Errorf("read value for %s from file failed: %s", name, err)
}
return name, string(c), nil
name = strings.TrimSuffix(name, "__FILE")
f, err := os.Open(path)
if err != nil {
return name, "", fmt.Errorf("read value for %s from file failed: %s", name, err)
}
defer f.Close()
c, err := ioutil.ReadAll(f)
if err != nil {
return name, "", fmt.Errorf("read value for %s from file failed: %s", name, err)
}
return name, string(c), nil
}

func (config *configOptions) loadRoutingNamespaces() *configOptions {
Expand Down

0 comments on commit 73621e1

Please sign in to comment.