1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-24 04:16:27 +02:00

fix: godoc and file checks

This commit is contained in:
Carlos Alexandro Becker 2018-02-03 16:47:03 -02:00 committed by Carlos Alexandro Becker
parent f3910c9751
commit b891a95a4b
2 changed files with 4 additions and 3 deletions

View File

@ -194,7 +194,8 @@ type Changelog struct {
Sort string `yaml:",omitempty"` Sort string `yaml:",omitempty"`
} }
// EnvFile is the // EnvFiles holds paths to files that contains environment variables
// values like the github token for example
type EnvFiles struct { type EnvFiles struct {
GitHubToken string `yaml:"github_token,omitempty"` GitHubToken string `yaml:"github_token,omitempty"`
} }

4
pipeline/env/env.go vendored
View File

@ -59,10 +59,10 @@ func loadEnv(env, path string) (string, error) {
if err != nil { if err != nil {
return "", err return "", err
} }
if _, err := os.Stat(path); os.IsNotExist(err) { bts, err := ioutil.ReadFile(path)
if os.IsNotExist(err) {
return "", nil return "", nil
} }
bts, err := ioutil.ReadFile(path)
if err != nil { if err != nil {
return "", err return "", err
} }