chore(lint): use reflect.Pointer over deprecated reflect.Ptr - #211
Open
iamlasse wants to merge 1 commit into
Open
chore(lint): use reflect.Pointer over deprecated reflect.Ptr#211iamlasse wants to merge 1 commit into
iamlasse wants to merge 1 commit into
Conversation
govet's inline check flags reflect.Ptr as deprecated since Go 1.18. Replace both usages in config.go's printStruct/isZero with the preferred reflect.Pointer constant. Nightshift-Task: lint-fix Nightshift-Ref: https://github.com/marcus/nightshift
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
Fixes the
govet inlinelint findings reported bygolangci-lint run ./...:cmd/nightshift/commands/config.go:373—reflect.Ptr→reflect.Pointercmd/nightshift/commands/config.go:411—reflect.Ptr→reflect.Pointerreflect.Ptris deprecated since Go 1.18 in favor of the preferredreflect.Pointerconstant. Both usages (inprintStructandisZero) are renamed.Verification
golangci-lint run ./...→ 0 issues (down from 2 govetinlinefindings onmain)go build ./...→ OKgo test ./...→ all packages passScope note
golangci-linton the current working tree (the unmergedcommit-normalizefeature,c26c5fd) reports 2 additionalerrcheckfindings incmd/nightshift/commands/commit.go. That file does not exist onmain— it is introduced by the unmerged commit-normalize feature, so those findings are addressed on that feature branch and are out of scope for this main-targeted PR.Nightshift-Task: lint-fix
Nightshift-Ref: https://github.com/marcus/nightshift
Automated by nightshift