Compare commits

..

No commits in common. "master" and "v0.1.0" have entirely different histories.

7 changed files with 21 additions and 49 deletions

View File

@ -9,16 +9,13 @@ on:
jobs:
unittest:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go: [ stable ]
os: [ ubuntu-latest-amd64, ubuntu-latest-arm64 ]
runs-on:
- ubuntu-latest
steps:
- uses: actions/checkout@v4.2.2
- uses: actions/setup-go@v5.5.0
with:
go-version: ${{ matrix.go }}
go-version: stable
- env:
GOPROXY: ${{ vars.GOPROXY }}
run: make test/unit

View File

@ -1,27 +0,0 @@
name: Golang CI lint
on:
pull_request:
types: [ "opened", "reopened", "synchronize" ]
push:
branches: [ '**' ]
tags-ignore: [ '**' ]
permissions:
contents: read
jobs:
golangci:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go: [ stable ]
os: [ ubuntu-latest-amd64, ubuntu-latest-arm64 ]
steps:
- uses: actions/checkout@v4.2.2
- uses: actions/setup-go@v5.5.0
with:
go-version: ${{ matrix.go }}
- uses: golangci/golangci-lint-action@v8.0.0
with:
version: v2.1

View File

@ -1,18 +1,20 @@
name: 'Lint Markdown files'
name: Markdown linter
on:
pull_request:
types: [ "opened", "reopened", "synchronize" ]
push:
branches: [ '*' ]
tags-ignore: [ '*' ]
branches: [ '**' ]
tags-ignore: [ '**' ]
workflow_dispatch: {}
jobs:
markdown-lint:
container:
image: git.cryptic.systems/volker.raschek/markdownlint:0.45.0
runs-on:
- ubuntu-latest
steps:
- uses: actions/checkout@v4.2.2
- uses: DavidAnson/markdownlint-cli2-action@v19.1.0
with:
globs: '**/*.md'
- name: Lint Markdown files
run: markdownlint --config .markdownlint.yaml .

2
go.mod
View File

@ -2,7 +2,7 @@ module git.cryptic.systems/volker.raschek/civ
go 1.24
toolchain go1.24.4
toolchain go1.24.3
require (
git.cryptic.systems/volker.raschek/dockerutils v0.2.0

View File

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

View File

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

View File

@ -182,7 +182,7 @@ func labelCompareSemver(compareSemver *domain.LabelConstraintCompareSemver, pars
}
func labelCompareString(compareString *domain.LabelConstraintCompareString, labelValue string) bool {
var majorState = true
var majorState bool = true
// 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 {
var majorState = true
var majorState bool = true
var i uint = 0
for key := range labels {