MCPcopy Create free account
hub / github.com/creasty/defaults / Server

Struct Server

example_test.go:76–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74
75func ExampleSet() {
76 type Server struct {
77 Host string `default:"localhost"`
78 Port int `default:"8080"`
79 Timeout time.Duration `default:"30s"`
80 Tags []string `default:"[\"web\"]"`
81 Labels map[string]string `default:"{\"env\": \"dev\"}"`
82 }
83
84 var server Server
85 if err := defaults.Set(&server); err != nil {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected