Repository navigation
CI: vet + modernize + race; fix progress bar math; move to slack-go/slack - #6
Merged
Merged
Conversation
Run go vet and the gopls modernize analyzer next to the gofmt check,
run tests with -race, update actions/checkout and actions/setup-go to
v7, and limit the workflow's GITHUB_TOKEN to read-only access.
Apply modernize's fix (interface{} -> any) so the new check passes.
- drawBar divided the percentage by Width instead of scaling it, so the bar was only right for Width 10: Width 20 at 100% showed 5 of 20 segments, and any Width under 10 panicked with a negative strings.Repeat count near completion. It also used the rune length of the filled part, which is wrong for multi-character Fill strings such as emoji shortcodes. - A failed chat.postMessage overwrote the channel with "", so every later Update failed. A failed chat.update cleared the timestamp, so the next Update posted a second progress bar. Only record state after a successful call, and record lastPct after the first post too. - Compute the percentage with integer math; float32 rounding reported 53/100 as 52%.
github.com/nlopes/slack v0.5.0 => v0.6.0 (its final release)
github.com/nlopes/slack is archived; development continues at github.com/slack-go/slack. The APIs used here are unchanged, so this is an import path swap. The slack client is unexported, so the package's public API is unaffected. github.com/nlopes/slack v0.6.0 => github.com/slack-go/slack v0.30.1
sfreiberg
force-pushed
the
ci-modernize
branch
from
October 26, 2026 19:47
928aa7d to
e589298
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
permissionsadded,go vetand goplsmodernizesteps added (x/tools v0.52.0), and tests now run with-race.drawBardivided by the width instead of scaling. AWidthunder 10 panicked with a negative repeat count,Width20 showed 5 of 20 segments at 100%, and multi-character fill strings broke the length.lastPctalso wasn't set after the first post.928aa7d). Only the import path changed, and the client is unexported, so the public API is unaffected. Drop that commit if you'd rather not switch.Test plan
go mod tidyare clean;go test -race ./...passes