Skip to content

Commit

Permalink
Allow FilePath to take []string
Browse files Browse the repository at this point in the history
  • Loading branch information
jmccann committed Oct 26, 2017
1 parent 33a0ff9 commit 93a45d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flag.go
Original file line number Diff line number Diff line change
Expand Up @@ -763,8 +763,8 @@ func stringifySliceFlag(usage, name string, defaultVals []string) string {
}

func flagFromFileEnv(filePath, envName string) (val string, ok bool) {
if filePath != "" {
if data, err := ioutil.ReadFile(filePath); err == nil {
for _, fileVar := range strings.Split(filePath, ",") {
if data, err := ioutil.ReadFile(fileVar); err == nil {
return string(data), true
}
}
Expand Down

0 comments on commit 93a45d3

Please sign in to comment.