fix(golangci): add config
All checks were successful
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 6s
Lint Markdown files / Run markdown linter (push) Successful in 3s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 29s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 23s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 59s

This commit is contained in:
2025-08-12 08:29:38 +02:00
parent 405f996e19
commit c60eb969d0
3 changed files with 18 additions and 2 deletions

View File

@ -43,7 +43,7 @@ func Fetch(urls ...string) ([]*dockerCompose.Config, error) {
return dockerComposeConfigs, nil
}
var ErrorPathIsDir error = errors.New("path is a directory")
var ErrPathIsDir error = errors.New("path is a directory")
func getDockerComposeViaHTTP(url string) (*dockerCompose.Config, error) {
req, err := http.NewRequest(http.MethodGet, url, nil)
@ -78,9 +78,10 @@ func readDockerComposeFromFile(name string) (*dockerCompose.Config, error) {
case err != nil:
return nil, err
case fileStat.IsDir():
return nil, fmt.Errorf("%w: %s", ErrorPathIsDir, name)
return nil, fmt.Errorf("%w: %s", ErrPathIsDir, name)
}
// #nosec G304
file, err := os.Open(name)
if err != nil {
return nil, err