func NewKey(c appengine.Context, kind, stringID string, intID int64, parent *Key) *Key
The documentation says :
NewKey creates a new key. kind cannot be empty. Either one or both of
stringID and intID must be zero. If both are zero, the key
returned is incomplete. parent must either be a complete key or nil.
What is the zero for string?
I tried 0 and nil, and I got errors like:
cannot use nil as type string in function argument
That’s
"":A string cannot be nil (but a
*stringcan).You can simply test
To pass a zero string in
stringID, useFrom the specification :