Skip to content

Commit

Permalink
Merge pull request #152 from VictorAvelar/update-dependencies
Browse files Browse the repository at this point in the history
Update deps
  • Loading branch information
VictorAvelar authored Oct 10, 2024
2 parents 7d7b922 + 79894ea commit f208b0c
Show file tree
Hide file tree
Showing 10 changed files with 183 additions and 585 deletions.
18 changes: 2 additions & 16 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
ARG GO_VERSION=1-bullseye
ARG GO_VERSION=1-1-bullseye

ARG VARIANT=1-bullseye
FROM mcr.microsoft.com/vscode/devcontainers/go:0-${GO_VERSION}

# Installs devtooling and font-utils
RUN apt-get update && \
apt install -y exa bat curl fontconfig

# Install shell superset https://starship.rs
RUN sh -c "$(curl -fsSL https://starship.rs/install.sh)" -y -f

# Install NerdFonts to enabled ligatures and glyphs.
RUN mkdir /root/.fonts && \
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v2.3.3/FiraCode.zip && \
unzip FiraCode.zip && \
rm FiraCode.zip && \
fc-cache /root/.fonts
FROM mcr.microsoft.com/vscode/devcontainers/go:${GO_VERSION}
43 changes: 29 additions & 14 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,32 +27,39 @@
}
],
"features": {
"ghcr.io/devcontainers-contrib/features/act-asdf:2": {},
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"dockerDashComposeVersion": "v2"
},
"ghcr.io/devcontainers/features/common-utils:2": {
"configureZshAsDefaultShell": true,
"username": "root"
},
"ghcr.io/devcontainers-contrib/features/starship:1": {},
"ghcr.io/rocker-org/devcontainer-features/apt-packages:1": {
"packages": "exa,bat,curl",
"upgradePackages": true
}
},
"customizations": {
"vscode": {
"extensions": [
// Editor extensions
"GitHub.vscode-pull-request-github",
"pnp.polacode",
"eamodio.gitlens",
"jasonlhy.hungry-delete",
"formulahendry.auto-rename-tag",
"DavidAnson.vscode-markdownlint",
"aaron-bond.better-comments",
"streetsidesoftware.code-spell-checker",
"PKief.material-icon-theme",
"ms-azuretools.vscode-docker",
"Gruntfuggly.todo-tree",
"shardulm94.trailing-spaces",
"ms-vscode.makefile-tools",
"redhat.vscode-yaml",
"bungcip.better-toml",
// Go
"golang.Go"
"tamasfe.even-better-toml",
"GitHub.copilot",
"GitHub.vscode-github-actions",
"GitHub.copilot-chat",
"golang.Go",
"usernamehw.errorlens",
"redhat.vscode-yaml"
],
"settings": {
"files.eol": "\n",
Expand Down Expand Up @@ -98,7 +105,12 @@
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.bracketPairColorization.enabled": true,
"editor.guides.bracketPairs": "active"
"editor.guides.bracketPairs": "active",
"workbench.iconTheme": "material-icon-theme",
"editor.fontFamily": "'Fira Code', Menlo, Monaco, 'Courier New', monospace",
"editor.fontLigatures": true,
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true
}
}
},
Expand All @@ -109,12 +121,15 @@
}
},
"postCreateCommand": {
"install-zsh-plugins": "git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting && git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions",
"modules": "go mod download",
"install-zsh-plugins": "git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting && git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions"
"taskfile": "go install github.com/go-task/task/v3/cmd/task@latest",
"gomarkdoc": "go install github.com/princjef/gomarkdoc/cmd/gomarkdoc@latest"
},
"containerUser": "root",
"remoteUser": "root",
"containerUser": "root",
"containerEnv": {
"MOLLIE_API_TOKEN": "${localEnv:MOLLIE_API_TOKE}"
"MOLLIE_API_TOKEN": "${localEnv:MOLLIE_API_TOKEN}",
"MOLLIE_ORG_TOKEN": "${localEnv:MOLLIE_ORG_TOKEN}"
}
}
}
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe
with:
go-version: 1.20.X
go-version: 1.23.X
- uses: golangci/golangci-lint-action@3cfe3a4abbb849e10058ce4af15d205b6da42804
with:
version: latest
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go: [1.20.x]
go: [1.22.x, 1.23.x]
name: Go ${{ matrix.go }} check
steps:
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
with:
go-version: ${{ matrix.go }}
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
- run: go test -failfast ./...
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
steps:
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe
with:
go-version: 1.20.x
go-version: 1.23.x
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
with:
fetch-depth: 0
Expand Down
29 changes: 11 additions & 18 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,19 @@

run:
concurrency: 4
timeout: 90s
timeout: 20s
issues-exit-code: 2
tests: false
skip-dirs-use-default: true
modules-download-mode: readonly
go: "1.21"
go: "1.17"

output:
format: tab
sort-results: true
formats:
- format: github-actions

linters:
disable:
- tagliatelle
- gochecknoinits
presets:
- bugs
- comment
Expand All @@ -36,10 +34,7 @@ issues:
exclude-rules:
- linters:
- lll
source: "payments create"
- linters:
- funlen
source: "addPersistentFlags"
source: "BusinessCategory"
fix: true
new: true

Expand All @@ -51,15 +46,13 @@ linters-settings:
- "$all"
allow:
- "$gostd"
- "github.com/VictorAvelar"
- "github.com/spf13"
- "github.com/avocatl"
- "github.com/sirupsen/logrus"
- "moul.io/http2curl"
- "github.com/Rhymond/go-money"
- "github.com/mitchellh/go-homedir"
- github.com/google
- github.com/spf13
- github.com/avocatl
- golang.org/x/oauth2
- github.com/VictorAvelar
tests:
files:
- "$tests"
- "$test"
allow:
- "github.com/stretchr/testify"
58 changes: 0 additions & 58 deletions Makefile

This file was deleted.

47 changes: 47 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
version: 3

tasks:
build:
cmds:
- docker build -t mollie-cli:latest -f Dockerfile .
run:
cmds:
- docker run --rm mollie-cli:latest
ci-lint:
cmds:
- golangci-lint run --out-format=tab --issues-exit-code=0 --sort-results --skip-dirs-use-default --tests=false --presets=bugs,complexity,format,performance,style,unused
pr-lint:
cmds:
- golangci-lint run --issues-exit-code=0 --out-format=github-actions --new=true --sort-results --skip-dirs-use-default --tests=false --presets=bugs,complexity,format,performance,style,unused
ci-all-presets:
cmds:
- golangci-lint run --out-format=tab --issues-exit-code=0 --sort-results --skip-dirs-use-default --tests=false --presets=bugs,comment,complexity,error,format,import,metalinter,module,performance,sql,style,test,unused
lint:
cmds:
- go version
- echo "Running go lint"
- golint ./...
- echo "Running go vet"
- go vet ./...
test:
cmds:
- run
test-local:
cmds:
- go test -v -failfast ./... -coverprofile cover.out
coverage:
cmds:
- go test ./... -coverprofile cover.out
- go tool cover -func=cover.out
clean:
cmds:
- go mod verify
- go mod tidy
compile-master:
cmds:
- git checkout master
- go build -o mollie-master ./cmd/mollie/main.go
- git checkout -
compile-current:
cmds:
- go build -o mollie ./cmd/mollie/main.go
46 changes: 26 additions & 20 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,43 +1,49 @@
module github.com/VictorAvelar/mollie-cli

go 1.20
go 1.22.0

toolchain go1.23.0

require (
github.com/Rhymond/go-money v1.0.10
github.com/VictorAvelar/mollie-api-go/v3 v3.13.0
github.com/Rhymond/go-money v1.0.14
github.com/VictorAvelar/mollie-api-go/v3 v3.14.0
github.com/avocatl/admiral v0.7.0
github.com/mitchellh/go-homedir v1.1.0
github.com/sirupsen/logrus v1.9.3
github.com/spf13/cobra v1.8.0
github.com/spf13/cobra v1.8.1
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.16.0
github.com/stretchr/testify v1.8.4
github.com/spf13/viper v1.19.0
github.com/stretchr/testify v1.9.0
moul.io/http2curl v1.0.0
)

require (
github.com/chzyer/readline v1.5.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/chzyer/readline v1.5.1 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/golang/mock v1.6.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/uuid v1.3.1 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/manifoldco/promptui v0.9.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/smartystreets/goconvey v1.7.2 // indirect
github.com/spf13/afero v1.9.5 // indirect
github.com/spf13/cast v1.5.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
golang.org/x/sys v0.8.0 // indirect
golang.org/x/text v0.9.0 // indirect
github.com/sagikazarmark/locafero v0.6.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/smartystreets/goconvey v1.8.1 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/cast v1.7.0 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c // indirect
golang.org/x/sys v0.26.0 // indirect
golang.org/x/text v0.19.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit f208b0c

Please sign in to comment.