Compare commits

..

1 Commits

Author SHA1 Message Date
51bf8cba6b
chore(deps): update davidanson/markdownlint-cli2-action action to v20
Some checks failed
Golang Tests / unittest (stable, ubuntu-latest-amd64) (push) Successful in 8s
Golang Tests / unittest (stable, ubuntu-latest-amd64) (pull_request) Successful in 7s
Golang CI lint / golangci (stable, ubuntu-latest-amd64) (pull_request) Failing after 20s
Lint Markdown files / markdown-lint (pull_request) Successful in 4s
Golang CI lint / golangci (stable, ubuntu-latest-amd64) (push) Failing after 2m21s
Golang Tests / unittest (stable, ubuntu-latest-arm64) (push) Successful in 42s
Golang CI lint / golangci (stable, ubuntu-latest-arm64) (push) Failing after 1m25s
Golang Tests / unittest (stable, ubuntu-latest-arm64) (pull_request) Successful in 44s
Golang CI lint / golangci (stable, ubuntu-latest-arm64) (pull_request) Failing after 1m25s
2025-06-01 11:42:00 +00:00
3 changed files with 9 additions and 9 deletions

View File

@ -5,5 +5,5 @@ import "git.cryptic.systems/volker.raschek/civ/cmd"
var version string var version string
func main() { func main() {
_ = cmd.Execute(version) cmd.Execute(version)
} }

View File

@ -65,7 +65,7 @@ func (jr *JSONReader) ReadFile() (*domain.Config, error) {
if err != nil { if err != nil {
return nil, err return nil, err
} }
defer func() { _ = f.Close() }() defer f.Close()
return jr.read(f) return jr.read(f)
} }
@ -79,7 +79,7 @@ func (jw *JSONWriter) WriteFile(config *domain.Config) error {
if err != nil { if err != nil {
return err return err
} }
defer func() { _ = f.Close() }() defer func() { f.Close() }()
return jw.write(f, config) return jw.write(f, config)
} }
@ -103,7 +103,7 @@ func (yr *YAMLReader) ReadFile() (*domain.Config, error) {
if err != nil { if err != nil {
return nil, err return nil, err
} }
defer func() { _ = f.Close() }() defer f.Close()
return yr.read(f) return yr.read(f)
} }
@ -129,7 +129,7 @@ func (yw *YAMLWriter) WriteFile(config *domain.Config) error {
if err != nil { if err != nil {
return err return err
} }
defer func() { _ = f.Close() }() defer func() { f.Close() }()
return yw.write(f, config) return yw.write(f, config)
} }

View File

@ -14,8 +14,8 @@ import (
// ContainerRuntime is an interface for different container runtimes to return labels // ContainerRuntime is an interface for different container runtimes to return labels
// based on their full qualified container image name. For example: // based on their full qualified container image name. For example:
// //
// imageLabels, err := Load(ctx, "docker.io/library/alpine:latest") // imageLabels, err := Load(ctx, "docker.io/library/alpine:latest")
// imageLabels, err := Load(ctx, "docker.io/library/busybox:latest") // imageLabels, err := Load(ctx, "docker.io/library/busybox:latest")
type ContainerRuntime interface { type ContainerRuntime interface {
GetImageLabels(ctx context.Context, name string) (map[string]string, error) GetImageLabels(ctx context.Context, name string) (map[string]string, error)
} }
@ -182,7 +182,7 @@ func labelCompareSemver(compareSemver *domain.LabelConstraintCompareSemver, pars
} }
func labelCompareString(compareString *domain.LabelConstraintCompareString, labelValue string) bool { func labelCompareString(compareString *domain.LabelConstraintCompareString, labelValue string) bool {
var majorState = true var majorState bool = true
// Equal // Equal
if compareString.Equal != "" { if compareString.Equal != "" {
@ -224,7 +224,7 @@ func labelCompareString(compareString *domain.LabelConstraintCompareString, labe
} }
func labelCount(re *regexp.Regexp, labelConstraintCounter *domain.LabelConstraintCounter, labels map[string]string) bool { func labelCount(re *regexp.Regexp, labelConstraintCounter *domain.LabelConstraintCounter, labels map[string]string) bool {
var majorState = true var majorState bool = true
var i uint = 0 var i uint = 0
for key := range labels { for key := range labels {