Ecosyste.ms: Packages

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

Top 7.3% on proxy.golang.org
Top 7.0% forks on proxy.golang.org

proxy.golang.org : github.com/myena/consul-decoder

Package decoder - this unmarshals or decodes values from a consul KV store into a struct. The following types are supported: By default, the decoder packages looks for the struct tag "decoder". However, this can be overridden inside the Decoder struct as shown below. For the purposes of examples, we'll stick with the default "decoder" tag. By default, in the absence of a decoder tag, it will look for a consul key name with the same name as the struct field. Only exported struct fields are considered. The name comparison is case-insensitive by default, but this is configurable in the Decoder struct. the tag "-" indicates to skip the field. The modifier ",json" appended to the end signals that the value is to be interpreted as json and unmarshaled rather than interpreted. Similarly, the modififier ",csv" allows comma separated values to be read into a slice, and ",ssv" allows space separated values to be read intoa slice. For csv and ssv, slices of string, numeric and boolean are supported.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/myena/consul-decoder
Keywords: consul, decoder, go, golang, hashicorp, unmarshal, unmarshaller, unmarshalling, whatwouldhashido
License: MIT
Latest release: over 1 year ago
First release: about 6 years ago
Namespace: github.com/myena
Stars: 8 on GitHub
Forks: 1 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 29 days ago

    Loading...
    Readme
    Loading...