Skip to content

Commit 8d01cc4

Browse files
committed
feat: add first version
0 parents  commit 8d01cc4

18 files changed

Lines changed: 2168 additions & 0 deletions

.editorconfig

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
[*]
7+
charset = utf-8
8+
end_of_line = LF
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true
11+
indent_style = space
12+
indent_size = 4
13+
14+
[Makefile]
15+
indent_style = tab
16+
17+
[*.md]
18+
trim_trailing_whitespace = false
19+
20+
[*.go]
21+
indent_style = tab
22+
23+
[*.{yaml,yaml.dist,yml,yml.dist}]
24+
indent_size = 2
25+
26+
[*.json]
27+
indent_size = 2
28+
29+
[*.proto]
30+
indent_size = 2
31+
32+
[*.hcl]
33+
indent_size = 2
34+
35+
[*.ts]
36+
indent_size = 2
37+
quote_type = single
38+
ij_typescript_use_double_quotes = false
39+
40+
[*.html]
41+
indent_size = 2

.github/dependabot.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
# Maintain dependencies for GitHub Actions
9+
- package-ecosystem: "github-actions"
10+
directory: "/"
11+
schedule:
12+
interval: "weekly"
13+
groups:
14+
all-actions:
15+
patterns: [ "*" ]
16+
17+
# Manage Go package versions.
18+
- package-ecosystem: gomod
19+
directory: "/"
20+
schedule:
21+
interval: "weekly"
22+
groups:
23+
opentelemetry:
24+
patterns:
25+
- "go.opentelemetry.io/*"

.github/workflows/ci.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Copyright 2026 Axel Etcheverry. All rights reserved.
2+
# Use of this source code is governed by a MIT
3+
# license that can be found in the LICENSE file.
4+
5+
name: CI
6+
7+
on:
8+
push:
9+
branches: [main]
10+
pull_request:
11+
branches: [main]
12+
13+
permissions:
14+
contents: read
15+
16+
env:
17+
GO_VERSION: "1.26"
18+
19+
jobs:
20+
ci:
21+
name: Lint & Tests
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v6
25+
26+
- uses: actions/setup-go@v6
27+
with:
28+
go-version: ${{ env.GO_VERSION }}
29+
30+
- name: golangci-lint
31+
uses: golangci/golangci-lint-action@v9
32+
with:
33+
version: v2.10.1
34+
args: --timeout=300s
35+
36+
- name: Run unit tests
37+
run: go test -race -coverprofile=coverage.out -timeout 300s ./...
38+
39+
- name: Upload coverage
40+
uses: actions/upload-artifact@v7
41+
with:
42+
name: coverage-unit
43+
path: coverage.out

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.DS_Store
2+
mock_*
3+
build/

.golangci.yml

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
formatters:
2+
enable:
3+
- gofmt
4+
exclusions:
5+
paths:
6+
- .*_mock\.go
7+
- mock_.*\.go
8+
- .*/pkg/mod/.*$
9+
- .*/go/src/.*\.go
10+
- third_party$
11+
- builtin$
12+
- examples$
13+
settings:
14+
gofmt:
15+
simplify: true
16+
goimports:
17+
local-prefixes:
18+
- go.opentelemetry.io
19+
issues:
20+
max-issues-per-linter: 50
21+
linters:
22+
default: none
23+
enable:
24+
- asciicheck
25+
- bodyclose
26+
- dogsled
27+
- durationcheck
28+
- errcheck
29+
- errorlint
30+
- exhaustive
31+
- forbidigo
32+
- forcetypeassert
33+
- goconst
34+
- gocritic
35+
- gocyclo
36+
- godot
37+
- gosec
38+
- govet
39+
- ineffassign
40+
- misspell
41+
- nestif
42+
- nilerr
43+
- nlreturn
44+
- noctx
45+
- prealloc
46+
- predeclared
47+
- revive
48+
- sqlclosecheck
49+
- staticcheck
50+
- unconvert
51+
- unused
52+
- whitespace
53+
- wrapcheck
54+
- wsl_v5
55+
exclusions:
56+
paths:
57+
- .*_mock\.go
58+
- mock_.*\.go
59+
- .*/pkg/mod/.*$
60+
- .*/go/src/.*\.go
61+
- third_party$
62+
- builtin$
63+
- examples$
64+
presets:
65+
- comments
66+
- common-false-positives
67+
- legacy
68+
- std-error-handling
69+
settings:
70+
depguard:
71+
rules:
72+
main:
73+
allow:
74+
- $all
75+
dupl:
76+
threshold: 99
77+
errcheck:
78+
check-blank: false
79+
check-type-assertions: false
80+
goconst:
81+
min-len: 3
82+
min-occurrences: 2
83+
gocyclo:
84+
min-complexity: 18
85+
govet:
86+
disable:
87+
- shadow
88+
misspell:
89+
ignore-rules:
90+
- cancelled
91+
locale: US
92+
revive:
93+
severity: warning
94+
output:
95+
formats:
96+
text:
97+
path: stdout
98+
print-issued-lines: true
99+
print-linter-name: true
100+
run:
101+
concurrency: 4
102+
issues-exit-code: 1
103+
tests: false
104+
version: "2"

.mockery.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
inpackage: True
2+
with-expecter: True
3+
all: True
4+
dir: "{{.InterfaceDir}}"
5+
mockname: "Mock{{.InterfaceName}}"
6+
outpkg: "{{.PackageName}}"
7+
filename: "mock_{{ .InterfaceName | snakecase }}.go"
8+
packages:
9+
github.com/quettara/notarize:
10+
config:
11+
recursive: True
12+
13+
issue-845-fix: True
14+
resolve-type-alias: False
15+
disable-version-string: True

Makefile

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
GO_FILES := $(shell find . -type f -name '*.go' -not -path "./vendor/*")
2+
BUILD_DIR := build
3+
4+
_build:
5+
@mkdir -p ${BUILD_DIR}
6+
7+
8+
.PHONY: clean
9+
clean:
10+
@go clean -i ./...
11+
12+
generate:
13+
@echo "Generating code..."
14+
@go generate ./...
15+
16+
$(BUILD_DIR)/coverage.out: _build $(GO_FILES)
17+
@go test -cover -race -coverprofile $(BUILD_DIR)/coverage.out.tmp -timeout 300s ./...
18+
@cat $(BUILD_DIR)/coverage.out.tmp | grep -v '.pb.go' | grep -v 'mock_' > $(BUILD_DIR)/coverage.out
19+
@rm $(BUILD_DIR)/coverage.out.tmp
20+
21+
.PHONY: lint
22+
lint:
23+
ifeq (, $(shell which golangci-lint))
24+
@echo "Install golangci-lint..."
25+
@go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.60.3
26+
endif
27+
@echo "lint..."
28+
@golangci-lint run --timeout=300s ./...
29+
30+
.PHONY: test
31+
test: $(BUILD_DIR)/coverage.out
32+
33+
.PHONY: coverage
34+
coverage: $(BUILD_DIR)/coverage.out
35+
@echo ""
36+
@go tool cover -func ./$(BUILD_DIR)/coverage.out
37+
38+
.PHONY: coverage-html
39+
coverage-html: $(BUILD_DIR)/coverage.out
40+
@go tool cover -html ./$(BUILD_DIR)/coverage.out

0 commit comments

Comments
 (0)