TODO(mdlayher): util packages are an anti-pattern and this should be moved somewhere else that is more focused in the future. A ValueParser enables parsing a single string into a variety of data types in a concise and safe way. The Err method must be invoked after invoking any other methods to ensur
| 24 | // in a concise and safe way. The Err method must be invoked after invoking |
| 25 | // any other methods to ensure a value was successfully parsed. |
| 26 | type ValueParser struct { |
| 27 | v string |
| 28 | err error |
| 29 | } |
| 30 | |
| 31 | // NewValueParser creates a ValueParser using the input string. |
| 32 | func NewValueParser(v string) *ValueParser { |
nothing calls this directly
no outgoing calls
no test coverage detected