An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 8.2% on proxy.golang.org

proxy.golang.org : github.com/xdg-go/strum

Package strum provides a string unmarshaler to tokenize line-oriented text (such as from stdin) and convert tokens into simple Go types. Tokenization defaults to whitespace-separated fields, but strum supports using delimiters, regular expressions, or a custom tokenizer. A line with a single token can be unmarshaled into a single variable of any supported type. A line with multiple tokens can be unmarshaled into a slice or a struct of supported types. It can also be unmarshaled into a single string, in which case tokenization is skipped. Trying to unmarshal multiple tokens into a single variable or too many tokens for the number of fields in a struct will result in an error. Having too few tokens for the fields in a struct is allowed; remaining fields will be zeroed. When unmarshaling to a slice, decoded values are appended; existing values are untouched. strum supports the following types: Additionally, there is special support for certain types: For numeric types, all Go literal formats are supported, including base prefixes (`0xff`) and underscores (`1_000_000`) for integers. For time.Time, strum detects and parses a wide varity of formats using the github.com/araddon/dateparse library. By default, it favors United States interpretation of MM/DD/YYYY and has time zone semantics equivalent to `time.Parse`. strum allows specifying a custom parser instead. strum provides `DecodeAll` to unmarshal all lines of input at once.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/xdg-go/strum
Keywords: go
License: Apache-2.0
Latest release: over 3 years ago
First release: over 3 years ago
Namespace: github.com/xdg-go
Stars: 6 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 7 days ago

    Loading...
    Readme
    Loading...