-
Notifications
You must be signed in to change notification settings - Fork 2
feat: updates & refactoring #64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
hutstep
wants to merge
4
commits into
main
Choose a base branch
from
feat/refactoring
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,20 +8,20 @@ permissions: | |
| contents: read | ||
|
|
||
| env: | ||
| GO_VERSION: '1.23.6' | ||
| GO_VERSION: "1.25.4" | ||
|
|
||
| jobs: | ||
| lint: | ||
| name: lint | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2 | ||
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # ratchet:actions/[email protected] | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 #v5.3.0 | ||
| uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # ratchet:actions/[email protected].0 | ||
| with: | ||
| go-version: ${{ env.GO_VERSION }} | ||
|
|
||
|
|
@@ -32,7 +32,7 @@ jobs: | |
| git diff --exit-code go.sum | ||
|
|
||
| - name: lint | ||
| uses: golangci/golangci-lint-action@4696ba8babb6127d732c3c6dde519db15edab9ea #v6.5.1 | ||
| uses: golangci/golangci-lint-action@0a35821d5c230e903fcfe077583637dea1b27b47 # ratchet:golangci/[email protected] | ||
| with: | ||
| version: latest | ||
| args: --issues-exit-code=1 --config=.golangci.yml | ||
|
|
@@ -43,20 +43,20 @@ jobs: | |
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2 | ||
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # ratchet:actions/[email protected] | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 #v5.3.0 | ||
| uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # ratchet:actions/[email protected].0 | ||
| with: | ||
| go-version: ${{ env.GO_VERSION }} | ||
|
|
||
| - name: Build with Goreleaser | ||
| uses: goreleaser/goreleaser-action@90a3faa9d0182683851fbfa97ca1a2cb983bfca3 #v6.2.1 | ||
| uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # ratchet:goreleaser/goreleaser-action@v6.4.0 | ||
| with: | ||
| distribution: goreleaser | ||
| version: '~> v2' | ||
| version: "~> v2" | ||
| args: release --snapshot --skip publish,archive,sbom,homebrew --clean --config .goreleaser.yaml | ||
|
|
||
| ci-windows: | ||
|
|
@@ -65,18 +65,18 @@ jobs: | |
| runs-on: windows-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2 | ||
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # ratchet:actions/[email protected] | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 #v5.3.0 | ||
| uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # ratchet:actions/[email protected].0 | ||
| with: | ||
| go-version: ${{ env.GO_VERSION }} | ||
|
|
||
| - name: Run GoReleaser | ||
| uses: goreleaser/goreleaser-action@90a3faa9d0182683851fbfa97ca1a2cb983bfca3 #v6.2.1 | ||
| uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # ratchet:goreleaser/goreleaser-action@v6.4.0 | ||
| with: | ||
| distribution: goreleaser | ||
| version: '~> v2' | ||
| version: "~> v2" | ||
| args: release --snapshot --skip publish,archive,sbom,chocolatey,winget --clean --config .goreleaser-windows.yaml | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,41 +3,41 @@ name: goreleaser | |
| on: | ||
| push: | ||
| tags: | ||
| - '*' | ||
| - "*" | ||
|
|
||
| permissions: | ||
| contents: write | ||
| packages: write | ||
|
|
||
| env: | ||
| GO_VERSION: '1.23.6' | ||
| GO_VERSION: "1.25.4" | ||
|
|
||
| jobs: | ||
| goreleaser-linux: | ||
| name: goreleaser-linux | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2 | ||
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # ratchet:actions/[email protected] | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Fetch all tags | ||
| run: git fetch --force --tags | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 #v5.3.0 | ||
| uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # ratchet:actions/[email protected].0 | ||
| with: | ||
| go-version: ${{ env.GO_VERSION }} | ||
|
|
||
| - name: Download Syft | ||
| uses: anchore/sbom-action/download-syft@f325610c9f50a54015d37c8d16cb3b0e2c8f4de0 #v0.18.0 | ||
| uses: anchore/sbom-action/download-syft@8e94d75ddd33f69f691467e42275782e4bfefe84 # ratchet:anchore/sbom-action/download-syft@v0.20.9 | ||
|
|
||
| - name: Run GoReleaser | ||
| uses: goreleaser/goreleaser-action@90a3faa9d0182683851fbfa97ca1a2cb983bfca3 #v6.2.1 | ||
| uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # ratchet:goreleaser/goreleaser-action@v6.4.0 | ||
| with: | ||
| distribution: goreleaser | ||
| version: '~> v2' | ||
| version: "~> v2" | ||
| args: release --clean --config .goreleaser.yaml | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
@@ -49,25 +49,25 @@ jobs: | |
| runs-on: windows-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2 | ||
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # ratchet:actions/[email protected] | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Fetch all tags | ||
| run: git fetch --force --tags | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 #v5.3.0 | ||
| uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # ratchet:actions/[email protected].0 | ||
| with: | ||
| go-version: ${{ env.GO_VERSION }} | ||
| - name: Download Syft | ||
| uses: anchore/sbom-action/download-syft@f325610c9f50a54015d37c8d16cb3b0e2c8f4de0 #v0.18.0 | ||
| uses: anchore/sbom-action/download-syft@8e94d75ddd33f69f691467e42275782e4bfefe84 # ratchet:anchore/sbom-action/download-syft@v0.20.9 | ||
|
|
||
| - name: Run GoReleaser | ||
| uses: goreleaser/goreleaser-action@90a3faa9d0182683851fbfa97ca1a2cb983bfca3 #v6.2.1 | ||
| uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # ratchet:goreleaser/goreleaser-action@v6.4.0 | ||
| with: | ||
| distribution: goreleaser | ||
| version: '~> v2' | ||
| version: "~> v2" | ||
| args: release --clean --config .goreleaser-windows.yaml | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,4 +24,7 @@ go.work | |
| bin | ||
| dist/ | ||
|
|
||
| azctx | ||
| azctx | ||
|
|
||
| .vscode/ | ||
| AGENTS.md | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,13 @@ | ||
| version: "2" | ||
|
|
||
| run: | ||
| tests: true | ||
| allow-parallel-runners: true | ||
| timeout: 5m | ||
|
|
||
| # https://github.com/golangci/golangci-lint/blob/master/.golangci.reference.yml | ||
| linters: | ||
| # Disable all linters. | ||
| # Default: false | ||
| disable-all: true | ||
| # Enable specific linter | ||
| default: none | ||
| enable: | ||
| - asciicheck | ||
| - bidichk | ||
|
|
@@ -17,15 +16,12 @@ linters: | |
| - errorlint | ||
| - funlen | ||
| #- errcheck | ||
| - gofmt | ||
| - goconst | ||
| - gofumpt | ||
| - gocyclo | ||
| - godox | ||
| - gosec | ||
| #- gocritic | ||
| #- govet | ||
| - goimports | ||
| - goheader | ||
| - misspell | ||
| - nolintlint | ||
|
|
@@ -38,97 +34,99 @@ linters: | |
| - unparam | ||
| - whitespace | ||
| #- nilerr | ||
| settings: | ||
| dupl: | ||
| # Tokens count to trigger issue. | ||
| # Default: 150 | ||
| threshold: 100 | ||
|
|
||
| linters-settings: | ||
| dupl: | ||
| # Tokens count to trigger issue. | ||
| # Default: 150 | ||
| threshold: 100 | ||
|
|
||
| errorlint: | ||
| # Check whether fmt.Errorf uses the %w verb for formatting errors. | ||
| # Default: true | ||
| asserts: false | ||
| errorlint: | ||
| # Check whether fmt.Errorf uses the %w verb for formatting errors. | ||
| # Default: true | ||
| asserts: false | ||
|
|
||
| funlen: | ||
| # Checks the number of lines in a function. | ||
| # Default: 60 | ||
| lines: -1 | ||
| # Default: 40 | ||
| statements: 50 | ||
| # Ignore comments when counting lines. | ||
| # Default false | ||
| ignore-comments: true | ||
| funlen: | ||
| # Checks the number of lines in a function. | ||
| # Default: 60 | ||
| lines: -1 | ||
| # Default: 40 | ||
| statements: 50 | ||
| # Ignore comments when counting lines. | ||
| # Default false | ||
| ignore-comments: true | ||
|
|
||
| goconst: | ||
| # Minimal length of string constant. | ||
| # Default: 3 | ||
| min-len: 2 | ||
| # Default: 3 | ||
| min-occurrences: 3 | ||
| goconst: | ||
| # Minimal length of string constant. | ||
| # Default: 3 | ||
| min-len: 2 | ||
| # Default: 3 | ||
| min-occurrences: 3 | ||
|
|
||
| # gocritic: | ||
| # enabled-tags: | ||
| # - diagnostic | ||
| # - experimental | ||
| # - opinionated | ||
| # - performance | ||
| # - style | ||
| # disabled-checks: | ||
| # - dupImport # https://github.com/go-critic/go-critic/issues/845 | ||
| # - ifElseChain | ||
| # - octalLiteral | ||
| # - whyNoLint | ||
| # gocritic: | ||
| # enabled-tags: | ||
| # - diagnostic | ||
| # - experimental | ||
| # - opinionated | ||
| # - performance | ||
| # - style | ||
| # disabled-checks: | ||
| # - dupImport # https://github.com/go-critic/go-critic/issues/845 | ||
| # - ifElseChain | ||
| # - octalLiteral | ||
| # - whyNoLint | ||
|
|
||
| gocyclo: | ||
| # Minimal code complexity to report. | ||
| # Default: 30 (but we recommend 10-20) | ||
| min-complexity: 15 | ||
| gocyclo: | ||
| # Minimal code complexity to report. | ||
| # Default: 30 (but we recommend 10-20) | ||
| min-complexity: 15 | ||
|
|
||
| godox: | ||
| keywords: | ||
| - FIXME | ||
| #- TODO | ||
| - FIX | ||
| - NOTE | ||
| - OPTIMIZE # marks code that should be optimized before merging | ||
| - HACK # marks hack-around that should be removed before merging | ||
| godox: | ||
| keywords: | ||
| - FIXME | ||
| #- TODO | ||
| - FIX | ||
| - NOTE | ||
| - OPTIMIZE # marks code that should be optimized before merging | ||
| - HACK # marks hack-around that should be removed before merging | ||
|
|
||
| gofmt: | ||
| # Simplify code: gofmt with `-s` option. | ||
| # Default: true | ||
| simplify: false | ||
| # Apply the rewrite rules to the source before reformatting. | ||
| # https://pkg.go.dev/cmd/gofmt | ||
| # Default: [] | ||
| rewrite-rules: | ||
| # - pattern: 'interface{}' | ||
| # replacement: 'any' | ||
| - pattern: 'a[b:len(a)]' | ||
| replacement: 'a[b:]' | ||
| # govet: | ||
| # enable-all: true | ||
| # disable: | ||
| # - fieldalignment | ||
|
|
||
| goimports: | ||
| local-prefixes: github.com/golangci/golangci-lint | ||
| misspell: | ||
| # Correct spellings using locale preferences for US or UK. | ||
| locale: US | ||
|
|
||
| # govet: | ||
| # enable-all: true | ||
| # disable: | ||
| # - fieldalignment | ||
| nolintlint: | ||
| # Disable to ensure that all nolint directives actually have an effect. | ||
| allow-unused: false # report any unused nolint directives | ||
| require-explanation: true # require an explanation for nolint directives | ||
| require-specific: true # require nolint directives to be specific about which linter is being skipped | ||
|
|
||
| misspell: | ||
| # Correct spellings using locale preferences for US or UK. | ||
| locale: US | ||
| # revive: | ||
| # rules: | ||
| # - name: indent-error-flow | ||
| # - name: unexported-return | ||
| # disabled: true | ||
| # - name: unused-parameter | ||
| # - name: unused-receiver | ||
|
|
||
| nolintlint: | ||
| # Disable to ensure that all nolint directives actually have an effect. | ||
| allow-unused: false # report any unused nolint directives | ||
| require-explanation: true # require an explanation for nolint directives | ||
| require-specific: true # require nolint directives to be specific about which linter is being skipped | ||
|
|
||
| # revive: | ||
| # rules: | ||
| # - name: indent-error-flow | ||
| # - name: unexported-return | ||
| # disabled: true | ||
| # - name: unused-parameter | ||
| # - name: unused-receiver | ||
| formatters: | ||
| enable: | ||
| - gofmt | ||
| - gofumpt | ||
| - goimports | ||
| settings: | ||
| gofmt: | ||
| # Simplify code: gofmt with `-s` option. | ||
| # Default: true | ||
| simplify: false | ||
| # Apply the rewrite rules to the source before reformatting. | ||
| # https://pkg.go.dev/cmd/gofmt | ||
| # Default: [] | ||
| rewrite-rules: | ||
| # - pattern: 'interface{}' | ||
| # replacement: 'any' | ||
| - pattern: "a[b:len(a)]" | ||
| replacement: "a[b:]" | ||
|
Comment on lines
+115
to
+132
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,7 +11,6 @@ builds: | |
| - windows | ||
| goarch: | ||
| - amd64 | ||
| - arm | ||
| - arm64 | ||
| ldflags: | ||
| - -s -w | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
settingskey should be nested underlinters, not at the same level. The correct structure for golangci-lint v2 islinters.settingsnotlintersas a separate top-level key alongsidesettings. This configuration may not work as intended.