https://github.com/mitranim/untext
[MOVED] Missing feature of the Go standard library: unmarshal arbitrary string into arbitrary value.
https://github.com/mitranim/untext
go golang parse parser
Last synced: 11 months ago
JSON representation
[MOVED] Missing feature of the Go standard library: unmarshal arbitrary string into arbitrary value.
- Host: GitHub
- URL: https://github.com/mitranim/untext
- Owner: mitranim
- License: unlicense
- Created: 2020-07-27T13:26:48.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-26T17:17:25.000Z (almost 3 years ago)
- Last Synced: 2025-02-24T06:44:42.460Z (11 months ago)
- Topics: go, golang, parse, parser
- Language: Go
- Homepage:
- Size: 5.86 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
**Moved to https://github.com/mitranim/gg**. This repo is usable but frozen.
## Overview
"Missing feature" of the Go packages `encoding` and `fmt`: unmarshal arbitrary
text into an arbitrary value. Counterpart to the marshaling functionality of
`fmt.Sprintf("%v")`.
## Docs
See the full documentation at https://godoc.org/github.com/mitranim/untext.
## Example
```go
var num int64
err := untext.Parse(`10`, &num)
var inst time.Time
err = untext.Parse(`0001-02-03T04:05:06Z`, &inst)
```
## Changelog
### v0.1.3
Breaking: use terms "unmarshal" for `[]byte` inputs and "parse" for `string` inputs. This conforms to the standard library naming conventions.
## License
https://unlicense.org
## Misc
I'm receptive to suggestions. If this library _almost_ satisfies you but needs changes, open an issue or chat me up. Contacts: https://mitranim.com/#contacts