diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ae3d873..011e0e3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,29 +23,29 @@ jobs: timeout-minutes: 15 strategy: matrix: - go-version: [1.25.x] + go-version: [1.26.x, 1.27.x] os: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7.0.1 with: persist-credentials: false - - uses: actions/setup-go@v6 + - uses: actions/setup-go@v7.0.0 with: go-version: ${{ matrix.go-version }} cache: true - name: golangci-lint - uses: golangci/golangci-lint-action@v9 + uses: golangci/golangci-lint-action@v9.3.0 with: - version: v2.7.2 + version: v2.13.2 - name: Build run: go build -v ./... - name: Run govulncheck - uses: golang/govulncheck-action@v1 + uses: golang/govulncheck-action@v1.1.0 with: go-version-input: ${{ matrix.go-version }} diff --git a/bot.go b/bot.go index 23902e3..7be3b8b 100644 --- a/bot.go +++ b/bot.go @@ -8,6 +8,7 @@ import ( "fmt" "log" "runtime/debug" + "slices" "sort" "strings" "text/tabwriter" @@ -198,12 +199,7 @@ func (*noopBackend) Listen(BotCommandRunner) error { return nil } // HasIgnorePauseFlag reports whether args contain the --ignore-pause flag, // which lets a single command run while the bot stays paused. func HasIgnorePauseFlag(args []string) bool { - for _, arg := range args { - if arg == "--ignore-pause" { - return true - } - } - return false + return slices.Contains(args, "--ignore-pause") } // BlockQuote returns the string block-quoted diff --git a/go.mod b/go.mod index 83142c3..4f91a4c 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,8 @@ module github.com/keybase/slackbot -go 1.25.0 +go 1.26.0 -toolchain go1.25.5 +toolchain go1.27.1 require ( github.com/alecthomas/kingpin/v2 v2.4.0