err variable wasn't properly defined using ':=' [forgot the colon]
a valid response resulted in a nil pointer dereference panic, because you were referencing a v.validator.Struct(i).Error() [Error() in this return was a nil, since no error was encountered]
Example didn't work as is: