fix(lint): replace deprecated reflect.Ptr with reflect.Pointer#176
Open
iamlasse wants to merge 1 commit into
Open
fix(lint): replace deprecated reflect.Ptr with reflect.Pointer#176iamlasse wants to merge 1 commit into
iamlasse wants to merge 1 commit into
Conversation
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
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
Resolves the two
govetinlinefindings reported bygolangci-lintby replacing the deprecatedreflect.Ptr(deprecated since Go 1.18) with its identical-semantics successorreflect.Pointer.Purely mechanical, no behavior change.
Changes
Single file, two call sites in
cmd/nightshift/commands/config.go:case reflect.Ptr:→case reflect.Pointer:case reflect.Ptr, reflect.Interface:→case reflect.Pointer, reflect.Interface:reflect.Ptrcannot be autofixed bygolangci-lint --fix, so these edits are manual.Before / after
golangci-lint run ./...gofmt -l .go vet ./...go build ./...go test ./...Nightshift-Task: lint-fix
Nightshift-Ref: https://github.com/marcus/nightshift
Automated by nightshift