Skip to content

chore(lint): use reflect.Pointer over deprecated reflect.Ptr - #211

Open
iamlasse wants to merge 1 commit into
marcus:mainfrom
iamlasse:chore/lint-fix-20260810
Open

chore(lint): use reflect.Pointer over deprecated reflect.Ptr#211
iamlasse wants to merge 1 commit into
marcus:mainfrom
iamlasse:chore/lint-fix-20260810

Conversation

@iamlasse

@iamlasse iamlasse commented Aug 10, 2026

Copy link
Copy Markdown

Summary

Fixes the govet inline lint findings reported by golangci-lint run ./...:

  • cmd/nightshift/commands/config.go:373reflect.Ptrreflect.Pointer
  • cmd/nightshift/commands/config.go:411reflect.Ptrreflect.Pointer

reflect.Ptr is deprecated since Go 1.18 in favor of the preferred reflect.Pointer constant. Both usages (in printStruct and isZero) are renamed.

Verification

  • golangci-lint run ./... → 0 issues (down from 2 govet inline findings on main)
  • go build ./... → OK
  • go test ./... → all packages pass

Scope note

golangci-lint on the current working tree (the unmerged commit-normalize feature, c26c5fd) reports 2 additional errcheck findings in cmd/nightshift/commands/commit.go. That file does not exist on main — 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

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant