You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(config): default configuration with merge support for downstream overrides (#396)
* feat(config): default configuration with merge support for downstream overrides
Creates the required infrastructure for downstream forks to be able to provide
default config overrides without modifying the original source code.
Downstream forks should be able to create merge/rebase scripts that
automatically accepted downstream merge conflicts in config_default_overrides.go
since this file will never change upstream.
Example usage for downstream forks:
To customize defaults, simply populate fields in the returned StaticConfig:
```go
func defaultOverrides() *StaticConfig {
return &StaticConfig{
ListOutput: "json", // Override default list output format
Toolsets: []string{"core"}, // Override default enabled toolsets
Port: "9000", // Override default port
}
}
```
Any fields specified here will override the base defaults defined in config_default.go.
Fields not specified will preserve their base default values.
Signed-off-by: Marc Nuri <[email protected]>
* test: skip downstream toolset (full) tests
Skips toolset metadata tests in case there are config overrides.
This is useful in downstream forks where the default toolsets
might be different to those upstream.
Signed-off-by: Marc Nuri <[email protected]>
---------
Signed-off-by: Marc Nuri <[email protected]>
0 commit comments