Skip to content

Commit 09eaf42

Browse files
committed
Initial commit
0 parents  commit 09eaf42

File tree

19 files changed

+1258
-0
lines changed

19 files changed

+1258
-0
lines changed

.github/workflows/build.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Go
2+
on:
3+
push:
4+
branches: [main]
5+
tags:
6+
- v*
7+
pull_request:
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Check out code into the Go module directory
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Set up Go
20+
uses: actions/setup-go@v5
21+
with:
22+
go-version: 1.22
23+
24+
- name: Test
25+
run: go test -v ./...
26+
27+
- name: Build
28+
run: go build -v .
29+
30+
- name: Run goreleaser in release mode
31+
if: success() && startsWith(github.ref, 'refs/tags/v')
32+
uses: goreleaser/goreleaser-action@v6
33+
with:
34+
version: latest
35+
args: release --clean
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: golangci-lint
2+
on:
3+
push:
4+
tags:
5+
- v*
6+
branches:
7+
- main
8+
pull_request:
9+
10+
jobs:
11+
golangci:
12+
name: lint
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: golangci-lint
18+
uses: golangci/golangci-lint-action@v6
19+
with:
20+
version: v1.62

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
dist/
2+
check_vspheredb_data

.golangci.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
run:
2+
timeout: 5m
3+
tests: false
4+
linters:
5+
enable-all: true
6+
disable:
7+
- cyclop
8+
- depguard
9+
- dupl
10+
- exhaustruct
11+
- forbidigo
12+
- forcetypeassert
13+
- gci
14+
- gochecknoglobals
15+
- gochecknoinits
16+
- godox
17+
- err113
18+
- gofumpt
19+
- lll
20+
- mnd
21+
- musttag
22+
- nakedret
23+
- nlreturn
24+
- nolintlint
25+
- nonamedreturns
26+
- tagliatelle
27+
- varnamelen
28+
- wrapcheck
29+
linters-settings:
30+
nestif:
31+
min-complexity: 4
32+
funlen:
33+
lines: 80

.goreleaser.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# See documentation at https://goreleaser.com
2+
version: 2
3+
before:
4+
hooks:
5+
- go mod download
6+
builds:
7+
- env:
8+
- CGO_ENABLED=0
9+
goarch:
10+
- amd64
11+
- arm64
12+
goos:
13+
- linux
14+
- windows
15+
- darwin
16+
ldflags:
17+
- >-
18+
-s -w -X main.version={{.Version}}
19+
-X main.commit={{.Commit}}
20+
-X main.date={{.CommitDate}}
21+
release:
22+
draft: true
23+
github:
24+
owner: NETWAYS
25+
name: check_vspheredb_data
26+
archives:
27+
- format: binary
28+
name_template: >-
29+
{{ .ProjectName }}_{{ .Tag }}_
30+
{{- if eq .Os "linux" }}Linux{{ end }}
31+
{{- if eq .Os "windows" }}Windows{{ end }}
32+
{{- if eq .Os "darwin" }}Darwin{{ end }}
33+
{{- if eq .Arch "amd64" }}_x86_64{{ end }}
34+
checksum:
35+
name_template: 'checksums.txt'
36+
snapshot:
37+
name_template: '{{ .Tag }}-SNAPSHOT-{{.ShortCommit}}'
38+
changelog:
39+
sort: asc
40+
filters:
41+
exclude:
42+
- '^docs:'
43+
- '^test:'

0 commit comments

Comments
 (0)