fix: resolve Go vet errors - #1
Open
beausterling wants to merge 1 commit into
Open
Conversation
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.
Fix Go vet errors in authentication and self-install
Human summary
This PR fixes two existing Go vet failures that prevent a clean
go test ./...run. One error path wrapped a directory string instead of the actual write error, and another passed runtime-generated text tofmt.Errorfas though it were a format string.After these corrections, the full test suite, vet pass, and both command builds complete successfully.
Problem
The repository's baseline validation failed with:
These failures affected contributor confidence and prevented standard Go validation from completing cleanly.
Root cause
internal/cli/install.goThe
self-installwrite failure used:%wrequires anerror, butbinDiris a string. The actualos.WriteFileerror was available aserrand was being discarded.internal/cli/auth.goThe HAR importer assembled a user-facing error message dynamically and returned it through:
Go vet flags a non-constant format string here. No formatting operation is needed after the message has been constructed.
Changes
internal/cli/install.goerrto%winternal/cli/auth.goerrors.New(msg)Both changed sites include
// PATCH:annotations according to the generated-tree contribution guidance inAGENTS.md.Behavior matrix
self-installbinary write succeedsself-installbinary write failsValidation evidence
Executed successfully on macOS ARM64 with Go 1.26.4:
go test ./... go vet ./... go build ./cmd/skool-pp-cli ./cmd/skool-pp-mcpObserved result:
go vet ./...exited successfullySecurity and privacy
Compatibility
Review guide
Recommended review order:
%wnow receives theos.WriteFileerror ininternal/cli/install.go.errors.Newininternal/cli/auth.go.Dependencies
None. This PR is independently mergeable.