Skip to content

fix(lint): replace deprecated reflect.Ptr with reflect.Pointer#176

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

fix(lint): replace deprecated reflect.Ptr with reflect.Pointer#176
iamlasse wants to merge 1 commit into
marcus:mainfrom
iamlasse:nightshift/lint-fix

Conversation

@iamlasse

@iamlasse iamlasse commented Jun 22, 2026

Copy link
Copy Markdown

Summary

Resolves the two govet inline findings reported by golangci-lint by replacing the deprecated reflect.Ptr (deprecated since Go 1.18) with its identical-semantics successor reflect.Pointer.

Purely mechanical, no behavior change.

Changes

Single file, two call sites in cmd/nightshift/commands/config.go:

  • line 373: case reflect.Ptr:case reflect.Pointer:
  • line 411: case reflect.Ptr, reflect.Interface:case reflect.Pointer, reflect.Interface:

reflect.Ptr cannot be autofixed by golangci-lint --fix, so these edits are manual.

Before / after

Check Before After
golangci-lint run ./... 2 issues (govet/inline) 0 issues
gofmt -l . clean clean
go vet ./... clean clean
go build ./... pass pass
go test ./... pass pass

Nightshift-Task: lint-fix
Nightshift-Ref: https://github.com/marcus/nightshift


Automated by nightshift

Replace the deprecated reflect.Ptr (deprecated since Go 1.18) with the
identical-semantics reflect.Pointer at two sites in config.go, resolving
the two govet/inline findings reported by golangci-lint. No behavior
change.

golangci-lint: 2 -> 0 issues.

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