diff --git a/.editorconfig b/.editorconfig index 56ded29..7b9bb7f 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,17 +1,27 @@ -# Drupal editor configuration normalization -# @see http://editorconfig.org/ +# This file is copied from config/symfony/.editorconfig in https://github.com/itk-dev/devops_itkdev-docker. +# Feel free to edit the file, but consider making a pull request if you find a general issue with the file. -# This is the top-most .editorconfig file; do not search in parent directories. +# EditorConfig is awesome: https://editorconfig.org + +# top-most EditorConfig file root = true -# All files. [*] +charset = utf-8 end_of_line = LF +indent_size = 4 indent_style = space -indent_size = 2 -charset = utf-8 -trim_trailing_whitespace = true insert_final_newline = true +trim_trailing_whitespace = true + +[*.{js,css,scss}] +indent_size = 2 + +[*.{yml,yaml}] +indent_size = 2 + +[config/**/*.{yml,yaml}] +indent_size = 4 [*.go] indent_style = tab diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml new file mode 100644 index 0000000..483da6e --- /dev/null +++ b/.github/workflows/changelog.yaml @@ -0,0 +1,29 @@ +# Do not edit this file! Make a pull request on changing +# github/workflows/changelog.yaml in +# https://github.com/itk-dev/devops_itkdev-docker if need be. + +### ### Changelog +### +### Checks that changelog has been updated + +name: Changelog + +on: + pull_request: + +jobs: + changelog: + runs-on: ubuntu-latest + strategy: + fail-fast: false + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 2 + + - name: Git fetch + run: git fetch + + - name: Check that changelog has been updated. + run: git diff --exit-code origin/${{ github.base_ref }} -- CHANGELOG.md && exit 1 || exit 0 diff --git a/.github/workflows/markdown.yaml b/.github/workflows/markdown.yaml new file mode 100644 index 0000000..f8bcf09 --- /dev/null +++ b/.github/workflows/markdown.yaml @@ -0,0 +1,44 @@ +# Do not edit this file! Make a pull request on changing +# github/workflows/markdown.yaml in +# https://github.com/itk-dev/devops_itkdev-docker if need be. + +### ### Markdown +### +### Lints Markdown files (`**/*.md`) in the project. +### +### [markdownlint-cli configuration +### files](https://github.com/igorshubovych/markdownlint-cli?tab=readme-ov-file#configuration), +### `.markdownlint.jsonc` and `.markdownlintignore`, control what is actually +### linted and how. +### +### #### Assumptions +### +### 1. A docker compose service named `markdownlint` for running `markdownlint` +### (from +### [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli)) +### exists. + +name: Markdown + +on: + pull_request: + push: + branches: + - main + - develop + +jobs: + markdown-lint: + runs-on: ubuntu-latest + strategy: + fail-fast: false + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Create docker network + run: | + docker network create frontend + + - run: | + docker compose run --rm markdownlint markdownlint '**/*.md' diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 3540b74..3a34c70 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -1,27 +1,13 @@ name: Review on: - push: - branches: [ "main" ] pull_request: - branches: [ "main" ] + push: + branches: + - main + - develop jobs: - changelog: - runs-on: ubuntu-latest - name: Changelog should be updated - strategy: - fail-fast: false - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Git fetch - run: git fetch - - - name: Check that changelog has been updated. - run: git diff --exit-code origin/${{ github.base_ref }} -- CHANGELOG.md && exit 1 || exit 0 - coding-standards-go-fmt: name: Go coding standards (fmt) runs-on: ubuntu-latest @@ -32,7 +18,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: ">=1.23.0" + go-version: "1.24.5" cache: true - name: Coding standards @@ -51,7 +37,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: ">=1.23.0" + go-version: "1.24.5" cache: true - name: go vet @@ -68,7 +54,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: ">=1.23.0" + go-version: "1.24.5" cache: true - name: go mod tidy @@ -86,7 +72,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: ">=1.23.0" + go-version: "1.24.5" cache: true - name: Build @@ -100,19 +86,8 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: ">=1.23.0" + go-version: "1.24.5" cache: true - name: Test run: go test -v ./... - - coding-standards-markdown: - name: Markdown coding standards - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Coding standards - run: | - docker run --rm --volume "$(pwd):/md" peterdavehello/markdownlint markdownlint --ignore LICENSE.md '**/*.md' diff --git a/.github/workflows/yaml.yaml b/.github/workflows/yaml.yaml new file mode 100644 index 0000000..8c60963 --- /dev/null +++ b/.github/workflows/yaml.yaml @@ -0,0 +1,41 @@ +# Do not edit this file! Make a pull request on changing +# github/workflows/yaml.yaml in +# https://github.com/itk-dev/devops_itkdev-docker if need be. + +### ### YAML +### +### Validates YAML files. +### +### #### Assumptions +### +### 1. A docker compose service named `prettier` for running +### [Prettier](https://prettier.io/) exists. +### +### #### Symfony YAML +### +### Symfony's YAML config files use 4 spaces for indentation and single quotes. +### Therefore we use a [Prettier configuration +### file](https://prettier.io/docs/configuration), `.prettierrc.yaml`, to make +### Prettier format YAML files in the `config/` folder like Symfony expects. + +name: YAML + +on: + pull_request: + push: + branches: + - main + - develop + +jobs: + yaml-lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Create docker network + run: | + docker network create frontend + + - run: | + docker compose run --rm prettier '**/*.{yml,yaml}' --check diff --git a/.gitignore b/.gitignore index 139ddd9..1cd2f65 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /gh-itkdev.exe dist/ +.task diff --git a/.golangci.yaml b/.golangci.yaml new file mode 100644 index 0000000..41f58be --- /dev/null +++ b/.golangci.yaml @@ -0,0 +1,10 @@ +# https://golangci-lint.run/usage/configuration/#config-file + +version: "2" + +# https://golangci-lint.run/usage/false-positives/ +linters: + exclusions: + rules: + - path: "cmd/changelog.go" + text: "Error return value of `cmd.Usage` is not checked" diff --git a/.markdownlint.jsonc b/.markdownlint.jsonc index a28c580..0253096 100644 --- a/.markdownlint.jsonc +++ b/.markdownlint.jsonc @@ -1,3 +1,7 @@ +// This file is copied from config/markdown/.markdownlint.jsonc in https://github.com/itk-dev/devops_itkdev-docker. +// Feel free to edit the file, but consider making a pull request if you find a general issue with the file. + +// markdownlint-cli configuration file (cf. https://github.com/igorshubovych/markdownlint-cli?tab=readme-ov-file#configuration) { "default": true, // https://github.com/DavidAnson/markdownlint/blob/main/doc/md013.md @@ -9,5 +13,10 @@ // https://github.com/DavidAnson/markdownlint/blob/main/doc/md024.md "no-duplicate-heading": { "siblings_only": true + }, + // https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/organizing-information-with-collapsed-sections#creating-a-collapsed-section + // https://github.com/DavidAnson/markdownlint/blob/main/doc/md033.md + "no-inline-html": { + "allowed_elements": ["details", "summary"] } } diff --git a/.markdownlintignore b/.markdownlintignore new file mode 100644 index 0000000..d143ace --- /dev/null +++ b/.markdownlintignore @@ -0,0 +1,12 @@ +# This file is copied from config/markdown/.markdownlintignore in https://github.com/itk-dev/devops_itkdev-docker. +# Feel free to edit the file, but consider making a pull request if you find a general issue with the file. + +# https://github.com/igorshubovych/markdownlint-cli?tab=readme-ov-file#ignoring-files +vendor/ +node_modules/ +LICENSE.md +# Drupal +web/*.md +web/core/ +web/libraries/ +web/*/contrib/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 24eb909..76c6688 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +* [PR-18](https://github.com/itk-dev/gh-itkdev/pull/18) + Updated and cleaned up code * [PR-16](https://github.com/itk-dev/gh-itkdev/pull/16) Added version check to determine release type * [PR-15](https://github.com/itk-dev/gh-itkdev/pull/15) diff --git a/README.md b/README.md index 28a9208..7256c0a 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ## Installation -```shell +``` shell gh extension install itk-dev/gh-itkdev ``` @@ -14,25 +14,25 @@ gh extension install itk-dev/gh-itkdev Manage changelog based on [keep a changelog](https://keepachangelog.com/en/1.1.0/): -```shell +``` shell gh itkdev changelog --help ``` Create changelog: -```shell +``` shell gh itkdev changelog --create ``` Update changelog for a pull request: -```shell +``` shell gh itkdev changelog --fucking-changelog ``` Update changelog for a release (`«tag»`): -```shell +``` shell gh itkdev changelog --release «tag» ``` diff --git a/Taskfile.yml b/Taskfile.yml index a42b1e3..e36f997 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -1,6 +1,9 @@ # https://taskfile.dev -version: '3' +version: "3" + +vars: + APP_NAME: gh-itkdev tasks: default: @@ -10,26 +13,62 @@ tasks: build: desc: "Check code and build" + sources: + - "**/*.go" + generates: + - "{{.APP_NAME}}" cmds: + - go get -u ./... + - go mod tidy + - task: format - task: check - go build - check: - desc: "Check code" - cmds: - - task: format - - task: vet - - go mod tidy - format: desc: "Format code" cmds: - go fmt ./... + - task format:gofumpt + - task format:golangci-lint + + format:gofumpt: + desc: Run gofumpt if installed (https://github.com/mvdan/gofumpt) + cmds: + - | + if command -v gofumpt >/dev/null 2>&1; then + gofumpt -l -w . + fi - vet: - desc: "Vet code" + format:golangci-lint: + desc: Run golangci-lint if installed (https://golangci-lint.run) + cmds: + - | + if command -v golangci-lint >/dev/null 2>&1; then + golangci-lint fmt + fi + + check: + desc: "Check code" cmds: - go vet ./... + - task: check:gofumpt + - task: check:golangci-lint + + check:gofumpt: + desc: Run gofumpt if installed (https://github.com/mvdan/gofumpt) + cmds: + - | + if command -v gofumpt >/dev/null 2>&1; then + gofumpt -l . + fi + + check:golangci-lint: + desc: Run golangci-lint if installed (https://golangci-lint.run) + cmds: + - | + if command -v golangci-lint >/dev/null 2>&1; then + golangci-lint run + fi test: desc: "Build and run tests" @@ -46,15 +85,38 @@ tasks: - goreleaser check # @see https://goreleaser.com/cmd/goreleaser_build/ - goreleaser build --single-target --snapshot --clean - - ./dist/*/gh-itkdev --version + - ./dist/*/{{.APP_NAME}} --version - coding-standards-check: - desc: "Apply and check coding standards" + coding-standards:markdown:apply: + desc: "Apply Markdown coding standards" + cmds: + - docker compose run --rm markdownlint markdownlint '**/*.md' --fix + + coding-standards:markdown:check: + desc: "Apply and check Markdown coding standards" cmds: - - task: coding-standards-apply - - docker run --rm --volume $PWD:/md itkdev/markdownlint --ignore LICENSE.md '**/*.md' + - task: coding-standards:markdown:apply + - docker compose run --rm markdownlint markdownlint '**/*.md' - coding-standards-apply: + coding-standards:yaml:apply: + desc: "Apply YAML coding standards" + cmds: + - docker compose run --rm prettier '**/*.{yml,yaml}' --write + + coding-standards:yaml:check: + desc: "Apply and check YAML coding standards" + cmds: + - task: coding-standards:yaml:apply + - docker compose run --rm prettier '**/*.{yml,yaml}' --check + + coding-standards:apply: desc: "Apply coding standards" cmds: - - docker run --rm --volume $PWD:/md itkdev/markdownlint --ignore LICENSE.md '**/*.md' --fix + - task: coding-standards:markdown:apply + - task: coding-standards:yaml:apply + + coding-standards:check: + desc: "Apply and check coding standards" + cmds: + - task: coding-standards:markdown:check + - task: coding-standards:yaml:check diff --git a/changelog/create.go b/changelog/create.go index 187405a..905519a 100644 --- a/changelog/create.go +++ b/changelog/create.go @@ -53,7 +53,11 @@ func Create(name string) { log.Fatalf("error creating changelog %s: %s", name, err) } - os.WriteFile(name, []byte(changelog), 0644) + err = os.WriteFile(name, []byte(changelog), 0o644) + if err != nil { + log.Fatalf("error writing changelog %s: %s", name, err) + } + fmt.Printf("Changelog written to %s\n", name) fmt.Println(changelog) diff --git a/changelog/fuckingchangelog.go b/changelog/fuckingchangelog.go index af0a368..8bc2de1 100644 --- a/changelog/fuckingchangelog.go +++ b/changelog/fuckingchangelog.go @@ -50,7 +50,7 @@ func addPullRequest(changelog string, pr pullRequest, itemTemplate string) (stri } // Make sure that we have a blank line after the header - if !(unreleasedHeaderIndex < len(lines)-2) { + if unreleasedHeaderIndex >= len(lines)-2 { lines = append(lines, "") } insertIndex := unreleasedHeaderIndex + 2 @@ -59,7 +59,10 @@ func addPullRequest(changelog string, pr pullRequest, itemTemplate string) (stri return "", fmt.Errorf("cannot parse item template: %s", err) } var builder strings.Builder - tmpl.Execute(&builder, pr) + err = tmpl.Execute(&builder, pr) + if err != nil { + return "", fmt.Errorf("error executing template: %s", err) + } item := builder.String() // If content right after insertion point is a header or a link, we insert a blank line @@ -97,7 +100,10 @@ func FuckingChangelog(name string, itemTemplate string) { log.Fatalf("error adding pull request: %s\n", err) } - os.WriteFile(name, []byte(updatedChangelog), 0644) + err = os.WriteFile(name, []byte(updatedChangelog), 0o644) + if err != nil { + log.Fatalf("error writing changelog %s: %s", name, err) + } fmt.Printf("Updated changelog written to %s\n", name) gitDiff([]string{name}) diff --git a/changelog/release.go b/changelog/release.go index b0e7388..621c3d7 100644 --- a/changelog/release.go +++ b/changelog/release.go @@ -155,7 +155,10 @@ func Release(release string, base string, name string, commit bool) { } fmt.Printf("Branch %s created\n", branch) - os.WriteFile(name, []byte(updatedChangelog), 0644) + err = os.WriteFile(name, []byte(updatedChangelog), 0o644) + if err != nil { + log.Fatalf("error writing changelog %s: %s", name, err) + } fmt.Printf("Updated changelog written to %s\n", name) if commit { diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..d3f6f82 --- /dev/null +++ b/compose.yaml @@ -0,0 +1,18 @@ +services: + markdownlint: + image: itkdev/markdownlint + profiles: + - dev + volumes: + - ./:/md + + prettier: + # Prettier does not (yet, fcf. + # https://github.com/prettier/prettier/issues/15206) have an official + # docker image. + # https://hub.docker.com/r/jauderho/prettier is good candidate (cf. https://hub.docker.com/search?q=prettier&sort=updated_at&order=desc) + image: jauderho/prettier + profiles: + - dev + volumes: + - ./:/work diff --git a/go.mod b/go.mod index 9ffef90..15c754a 100644 --- a/go.mod +++ b/go.mod @@ -1,34 +1,32 @@ module github.com/itk-dev/gh-itkdev -go 1.23.0 - -toolchain go1.24.1 +go 1.24.5 require ( github.com/cli/go-gh v1.2.1 - github.com/spf13/cobra v1.8.0 + github.com/spf13/cobra v1.9.1 github.com/stretchr/testify v1.9.0 - golang.org/x/mod v0.24.0 + golang.org/x/mod v0.26.0 ) require ( - github.com/cli/safeexec v1.0.0 // indirect - github.com/cli/shurcooL-graphql v0.0.2 // indirect + github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect + github.com/cli/safeexec v1.0.1 // indirect + github.com/cli/shurcooL-graphql v0.0.4 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/henvic/httpretty v0.0.6 // indirect + github.com/henvic/httpretty v0.1.4 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/lucasb-eyer/go-colorful v1.2.0 // indirect - github.com/mattn/go-isatty v0.0.17 // indirect - github.com/mattn/go-runewidth v0.0.14 // indirect - github.com/muesli/termenv v0.12.0 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/mattn/go-runewidth v0.0.16 // indirect + github.com/muesli/termenv v0.16.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/rivo/uniseg v0.4.4 // indirect + github.com/rivo/uniseg v0.4.7 // indirect github.com/rogpeppe/go-internal v1.10.0 // indirect - github.com/spf13/pflag v1.0.5 // indirect - github.com/thlib/go-timezone-local v0.0.0-20210907160436-ef149e42d28e // indirect - golang.org/x/net v0.7.0 // indirect - golang.org/x/sys v0.5.0 // indirect - golang.org/x/term v0.5.0 // indirect + github.com/spf13/pflag v1.0.7 // indirect + github.com/thlib/go-timezone-local v0.0.7 // indirect + golang.org/x/sys v0.34.0 // indirect + golang.org/x/term v0.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index cf7235e..a8c45f9 100644 --- a/go.sum +++ b/go.sum @@ -1,19 +1,21 @@ github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE= +github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= +github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= github.com/cli/go-gh v1.2.1 h1:xFrjejSsgPiwXFP6VYynKWwxLQcNJy3Twbu82ZDlR/o= github.com/cli/go-gh v1.2.1/go.mod h1:Jxk8X+TCO4Ui/GarwY9tByWm/8zp4jJktzVZNlTW5VM= -github.com/cli/safeexec v1.0.0 h1:0VngyaIyqACHdcMNWfo6+KdUYnqEr2Sg+bSP1pdF+dI= -github.com/cli/safeexec v1.0.0/go.mod h1:Z/D4tTN8Vs5gXYHDCbaM1S/anmEDnJb1iW0+EJ5zx3Q= -github.com/cli/shurcooL-graphql v0.0.2 h1:rwP5/qQQ2fM0TzkUTwtt6E2LbIYf6R+39cUXTa04NYk= -github.com/cli/shurcooL-graphql v0.0.2/go.mod h1:tlrLmw/n5Q/+4qSvosT+9/W5zc8ZMjnJeYBxSdb4nWA= -github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cli/safeexec v1.0.1 h1:e/C79PbXF4yYTN/wauC4tviMxEV13BwljGj0N9j+N00= +github.com/cli/safeexec v1.0.1/go.mod h1:Z/D4tTN8Vs5gXYHDCbaM1S/anmEDnJb1iW0+EJ5zx3Q= +github.com/cli/shurcooL-graphql v0.0.4 h1:6MogPnQJLjKkaXPyGqPRXOI2qCsQdqNfUY1QSJu2GuY= +github.com/cli/shurcooL-graphql v0.0.4/go.mod h1:3waN4u02FiZivIV+p1y4d0Jo1jc6BViMA73C+sZo2fk= +github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslCrtky5vbi9dd7HrQPQIx6wqiw= github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI= -github.com/henvic/httpretty v0.0.6 h1:JdzGzKZBajBfnvlMALXXMVQWxWMF/ofTy8C3/OSUTxs= -github.com/henvic/httpretty v0.0.6/go.mod h1:X38wLjWXHkXT7r2+uK8LjCMne9rsuNaBLJ+5cU2/Pmo= +github.com/henvic/httpretty v0.1.4 h1:Jo7uwIRWVFxkqOnErcoYfH90o3ddQyVrSANeS4cxYmU= +github.com/henvic/httpretty v0.1.4/go.mod h1:Dn60sQTZfbt2dYsdUSNsCljyF4AfdqnuJFDLJA1I4AM= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= @@ -22,52 +24,43 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= -github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= -github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= +github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s= github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8= -github.com/muesli/termenv v0.12.0 h1:KuQRUE3PgxRFWhq4gHvZtPSLCGDqM5q/cYr1pZ39ytc= -github.com/muesli/termenv v0.12.0/go.mod h1:WCCv32tusQ/EEZ5S8oUIIrC/nIuBcxCVqlN4Xfkv+7A= +github.com/muesli/termenv v0.16.0 h1:S5AlUN9dENB57rsbnkPyfdGuWIlkmzJjbFf0Tf5FWUc= +github.com/muesli/termenv v0.16.0/go.mod h1:ZRfOIKPFDYQoDFF4Olj7/QJbW60Ol/kL1pU3VfY/Cnk= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= -github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= +github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= -github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo= +github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0= +github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/pflag v1.0.7 h1:vN6T9TfwStFPFM5XzjsvmzZkLuaLX+HS+0SeFLRgU6M= +github.com/spf13/pflag v1.0.7/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/thlib/go-timezone-local v0.0.0-20210907160436-ef149e42d28e h1:BuzhfgfWQbX0dWzYzT1zsORLnHRv3bcRcsaUk0VmXA8= -github.com/thlib/go-timezone-local v0.0.0-20210907160436-ef149e42d28e/go.mod h1:/Tnicc6m/lsJE0irFMA0LfIwTBo4QP7A8IfyIv4zZKI= -golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU= -golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= -golang.org/x/net v0.0.0-20220923203811-8be639271d50/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +github.com/thlib/go-timezone-local v0.0.7 h1:fX8zd3aJydqLlTs/TrROrIIdztzsdFV23OzOQx31jII= +github.com/thlib/go-timezone-local v0.0.7/go.mod h1:/Tnicc6m/lsJE0irFMA0LfIwTBo4QP7A8IfyIv4zZKI= +golang.org/x/mod v0.26.0 h1:EGMPT//Ezu+ylkCijjPc+f4Aih7sZvaAr+O3EHBxvZg= +golang.org/x/mod v0.26.0/go.mod h1:/j6NAhSk8iQ723BGAUyoAcn7SlD7s15Dp9Nd/SfeaFQ= golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA= +golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/term v0.33.0 h1:NuFncQrRcaRvVmgRkvM3j/F00gWIAlcmlB8ACEKmGIg= +golang.org/x/term v0.33.0/go.mod h1:s18+ql9tYWp1IfpV9DmCtQDDSRBUjKaw9M1eAv5UeF0= +golang.org/x/tools v0.34.0 h1:qIpSLOxeCYGg9TrcJokLBG4KFA6d795g0xkBkiESGlo= +golang.org/x/tools v0.34.0/go.mod h1:pAP9OwEaY1CAW3HOmg3hLZC5Z0CCmzjAF2UQMSqNARg= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=