FromString returns a UUID parsed from the input string. Input is expected in a form accepted by UnmarshalText.
(input string)
| 57 | // FromString returns a UUID parsed from the input string. |
| 58 | // Input is expected in a form accepted by UnmarshalText. |
| 59 | func FromString(input string) (UUID, error) { |
| 60 | u := UUID{} |
| 61 | err := u.UnmarshalText([]byte(input)) |
| 62 | return u, err |
| 63 | } |
| 64 | |
| 65 | // FromStringOrNil returns a UUID parsed from the input string. |
| 66 | // Same behavior as FromString(), but returns uuid.Nil instead of an error. |
no test coverage detected