ObjectFromString parses a string into an Object. It returns an error if the string is not valid.
(objectstr string)
| 233 | |
| 234 | // ObjectFromString parses a string into an Object. It returns an error if the string is not valid. |
| 235 | func ObjectFromString(objectstr string) (Object, error) { |
| 236 | o := Object(objectstr) |
| 237 | err := o.validate() |
| 238 | if err != nil { |
| 239 | return "", err |
| 240 | } |
| 241 | |
| 242 | return o, nil |
| 243 | } |
| 244 | |
| 245 | // ObjectUser represents a user. |
| 246 | func ObjectUser(userName string) Object { |
searching dependent graphs…