Go Nil: Difference between revisions
Jump to navigation
Jump to search
Line 2: | Line 2: | ||
* [[Go Language]] | * [[Go Language]] | ||
=Overview= | =Overview= | ||
<code>nil</code> is the Go [[Go_Language#Pre-Declared_Zero_Value|pre-declared zero value]]. | |||
=<tt>nil</tt> Test= | =<tt>nil</tt> Test= |
Latest revision as of 00:55, 23 August 2023
Internal
Overview
nil
is the Go pre-declared zero value.
nil Test
if v == nil {
// ...
}
if v != nil {
// ...
}