Skip to content
This repository has been archived by the owner on Feb 15, 2024. It is now read-only.

Linting (G304) | Explicitly use filepath.Clean #114

Merged
merged 1 commit into from
Jul 22, 2020

Conversation

atc0005
Copy link
Owner

@atc0005 atc0005 commented Jul 22, 2020

Instead of using the original value as-is or attempting to create a localized cleanFilename var, use filepath.Clean directly at the os.Open call. This resolves the original linting issue and (presumably) makes our intent clearer.

fixes GH-106

Instead of using the original value as-is or attempting to
create a localized "cleanFilename" var, use filepath.Clean
directly at the os.Open call. This resolves the original
linting issue and (presumably) makes our intent clearer.

refs GH-106
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working linting
Projects
None yet
Development

Successfully merging this pull request may close these issues.

internal/fileutils/contains.go:40:12: G304: Potential file inclusion via variable (gosec)
1 participant