Skip to content

Commit

Permalink
feat: config constructor not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasjarosch committed Mar 13, 2024
1 parent 09e2166 commit d1ced6f
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions plugins/output/copy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"path/filepath"

"github.com/lukasjarosch/skipper"
"github.com/lukasjarosch/skipper/codec"
"github.com/lukasjarosch/skipper/data"
)

Expand All @@ -17,21 +16,6 @@ type Config struct {
Overwrite bool `yaml:"overwrite"`
}

func NewConfig(raw map[string]interface{}) (Config, error) {
yaml := codec.NewYamlCodec()
b, err := yaml.Marshal(raw)
if err != nil {
return Config{}, err
}

var config Config
err = yaml.UnmarshalTarget(b, &config)
if err != nil {
return Config{}, err
}
return config, nil
}

var ConfigPath = data.NewPath("config.plugins.output.copy")

// Plugin symbol which is loaded by skipper.
Expand Down

0 comments on commit d1ced6f

Please sign in to comment.