How do I go about finding the length of a string pointer which comes from a struct. Currently I am writing unit tests and want to see whether a string pointer is less than 250 characters. If r is my and myString is a string pointer.
This code is not valid:
if len(r.myString) > 256 {
return ErrStringTooLong
}