1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-30 04:50:45 +02:00

fix: gosec lint issues

This commit is contained in:
Carlos Alexandro Becker 2018-09-04 09:26:45 -03:00
parent 5cc504fb94
commit 431c28b2bd
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940
4 changed files with 4 additions and 5 deletions

View File

@ -104,8 +104,7 @@ func process(ctx *context.Context, docker config.Docker, artifact artifact.Artif
if err != nil {
return errors.Wrap(err, "failed to create temporaty dir")
}
defer os.RemoveAll(tmp)
log.Info("tempdir: " + tmp)
log.Debug("tempdir: " + tmp)
// nolint:prealloc
var images []string
for _, tagTemplate := range docker.TagTemplates {

View File

@ -56,7 +56,7 @@ func loadEnv(env, path string) (string, error) {
if err != nil {
return "", err
}
f, err := os.Open(path)
f, err := os.Open(path) // #nosec
if os.IsNotExist(err) {
return "", nil
}

View File

@ -27,7 +27,7 @@ func New(target io.Writer) Archive {
// Add a file to the zip archive
func (a Archive) Add(name, path string) (err error) {
file, err := os.Open(path)
file, err := os.Open(path) // #nosec
if err != nil {
return
}

View File

@ -327,7 +327,7 @@ type Project struct {
// Load config file
func Load(file string) (config Project, err error) {
f, err := os.Open(file)
f, err := os.Open(file) // #nosec
if err != nil {
return
}