Registry / config / mitchellh-consulstructure

mitchellh-consulstructure

JSON →
library0.0.0-20190329231841-56fdc4d2da54gogounverified

Package consulstructure provides a way to decode Consul key-value pairs into Go structs.

go get github.com/mitchellh/consulstructure
INSTALL
IMPORT
SIG · MITCHELLH-CONSULST
M
mitchellh-consulstructure
configgov0.0.0-20190329231841-56fdc4d2da54
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

consulstructure
github.com/mitchellh/consulstructure

Decode Consul KV data into a struct

package main import ( "fmt" "github.com/mitchellh/consulstructure" ) func main() { type Config struct { Host string `json:"host"` Port int `json:"port"` } var cfg Config consulstructure.Decode("myapp/config", &cfg) fmt.Println(cfg.Host) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.0.0-20190329231841-56fdc4d2da54latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
26 hits · last 30 days
node
20
OpenAI (training)
1
Resources
mitchellh-consulstructure — go get mitchellh-consulstructure · libregistry