Skip to content

[MOVED] Missing feature of the Go standard library: unmarshal arbitrary string into arbitrary value.

License

Notifications You must be signed in to change notification settings

mitranim/untext

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

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

About

[MOVED] Missing feature of the Go standard library: unmarshal arbitrary string into arbitrary value.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages