fix lints: declaration of "err" shadows declaration at io.go:11
This commit is contained in:
parent
e5ff238e79
commit
a54593d7f3
|
@ -9,12 +9,12 @@ import (
|
||||||
// Stream return a byte stream of a given file
|
// Stream return a byte stream of a given file
|
||||||
func (s Settings) Stream(file string) ([]byte, error) {
|
func (s Settings) Stream(file string) ([]byte, error) {
|
||||||
_, err := os.Stat(file)
|
_, err := os.Stat(file)
|
||||||
if err == nil {
|
if err != nil {
|
||||||
content, err := ioutil.ReadFile(file)
|
return nil, err
|
||||||
s.Validate(err)
|
|
||||||
return content, err
|
|
||||||
}
|
}
|
||||||
return nil, err
|
content, err := ioutil.ReadFile(file)
|
||||||
|
s.Validate(err)
|
||||||
|
return content, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write a file given a name and a byte stream
|
// Write a file given a name and a byte stream
|
||||||
|
|
Loading…
Reference in New Issue