i am new to Golang.

can you just share some piece of code just to check each field in struct
for empty or nil or zero value.

On Tue, Nov 22, 2016 at 4:19 PM, Dave Cheney <d...@cheney.net> wrote:

> If you want to write a general function you will need to use the reflect
> package, specifically reflect.Value.IsValid to check each field to see if
> it contains the zero value or not.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "golang-nuts" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/golang-nuts/neGz_Rxtxxw/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> golang-nuts+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to