Conversation
…non-nillable kinds Signed-off-by: Norway-02 <anshulkhetade02@gmail.com>
Norway-02
requested review from
ffjlabo,
mohammedfirdouss and
t-kikuc
and
a lite review from Copilot
September 15, 2026 04:06
✅ Deploy Preview for pipecd-site ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Author
|
cc @mohammedfirdouss @TheRealShek @Warashi - Please review when you get a chance. Thanks! |
Contributor
|
@Norway-02 you donot need to tag me cause i am not an maintainer of this codebase. Happy contributing! |
Author
|
Thanks for letting me know @TheRealShek! Appreciate it. |
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.
What this PR does:
Guards
v.IsNil()insideisEmptyInterfaceinpkg/diff/diff.goso it is only called on nillablereflect.Valuekinds (Chan,Func,Map,Pointer,UnsafePointer,Interface,Slice).Why we need it:
In Go's
reflectpackage, callingValue.IsNil()on non-nillable kinds (Bool,Int,String,Struct, etc.) causes an unhandled runtime panic (reflect: call of reflect.Value.IsNil on ... Value). Adding kind checks before callingv.IsNil()prevents panics when diffing un-wrapped primitive values.Which issue(s) this PR fixes:
Fixes # NONE
Does this PR introduce a user-facing change?:
Screenshots/Videos (for documentation or website changes):
N/A