traefik / plugindemo

This repository includes an example plugin, for you to use as a reference for developing your own plugins
https://plugins.traefik.io/plugins/628c9ee2108ecc83915d7764/demo-plugin
Apache License 2.0
136 stars 44 forks source link

Update Go version #24

Open FlowingSPDG opened 6 days ago

FlowingSPDG commented 6 days ago

Hi, I tried to make a plugin by myself and noticed Go itself and several tools version are old so I updated.

Updated tools

Updated tool settings

Other

Maybe we can use package plugindemo instead of package plugindemo_test for demo_test.go since golangci-lint detects depguard because it imports not-test package?

FlowingSPDG commented 6 days ago

@ldez Hey, thanks for the review!

I applied your suggestion :) thank you!

ldez commented 5 days ago

All the following section:

```yml steps: # https://github.com/marketplace/actions/setup-go-environment - name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}(${{ matrix.arch }}) uses: actions/setup-go@v5 with: go-version: ${{ matrix.go-version }} architecture: ${{ matrix.arch }} # https://github.com/marketplace/actions/checkout - name: Checkout code uses: actions/checkout@v2 # https://github.com/marketplace/actions/cache - name: Cache Go modules uses: actions/cache@v3 with: # In order: # * Module download cache # * Build cache (Linux) # * Build cache (Mac) # * Build cache (Windows) path: | ~/go/pkg/mod ~/.cache/go-build ~/Library/Caches/go-build %LocalAppData%\go-build key: ${{ runner.os }}-${{ matrix.arch }}-${{ matrix.go-version }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-${{ matrix.arch }}-${{ matrix.go-version }}-go- ```

should be replaced by:

steps:
  - uses: actions/checkout@v4
  - uses: actions/setup-go@v5
    with:
      go-version: ${{ matrix.go-version }}
      architecture: ${{ matrix.arch }}