| 74 | |
| 75 | func 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 { |
nothing calls this directly
no outgoing calls
no test coverage detected