Extract config structs into pkg/probodconfig
probod-bootstrap only needs the config struct definitions for YAML marshaling but transitively pulled in ~40 heavy runtime dependencies via pkg/probod. Move all config types and their methods to a new pkg/probodconfig package and re-export them from pkg/probod via type aliases for backward compatibility. Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -19,11 +19,11 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"go.probo.inc/probo/pkg/probod"
|
||||
"go.probo.inc/probo/pkg/probodconfig"
|
||||
"sigs.k8s.io/yaml"
|
||||
)
|
||||
|
||||
func WriteConfig(cfg *probod.FullConfig, path string) error {
|
||||
func WriteConfig(cfg *probodconfig.FullConfig, path string) error {
|
||||
dir := filepath.Dir(path)
|
||||
if err := os.MkdirAll(dir, 0755); err != nil {
|
||||
return fmt.Errorf("create directory %s: %w", dir, err)
|
||||
|
||||
Reference in New Issue
Block a user