Hello, I just started to learn golang and I have a small dillema.
My programming is too defensive OR how can I replicate this scenario (for
my test coverage sake)
list = list.New()
element := list.PushBack(item)
if element == nil {
//don't know how this can happen, just being defensive
return false
}
or
element:= list.Back()
//can element be nil ?
I browsed the list.List code but still haven't found a solution how to
replicate this case.
Thanks!!
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.