diff --git a/cmd/seal/main.go b/cmd/seal/main.go index aec9320..9b80d57 100644 --- a/cmd/seal/main.go +++ b/cmd/seal/main.go @@ -10,9 +10,13 @@ import ( ) func main() { - fn.Logf(fmt.Sprintf("krm-fn-sealedsecets-seal (version=%s, url=%s)", version.Name, version.URL)) - - if err := fn.AsMain(fn.ResourceListProcessorFunc(seal.Process)); err != nil { + if err := fn.AsMain(fn.ResourceListProcessorFunc(process)); err != nil { os.Exit(1) } } + +func process(rl *fn.ResourceList) (bool, error) { + rl.Results.Infof(fmt.Sprintf("krm-fn-sealedsecets-seal (version=%s, url=%s)", version.Name, version.URL)) + + return seal.Process(rl) +} diff --git a/cmd/unseal/main.go b/cmd/unseal/main.go index 6822158..caf0d01 100644 --- a/cmd/unseal/main.go +++ b/cmd/unseal/main.go @@ -10,9 +10,13 @@ import ( ) func main() { - fn.Logf(fmt.Sprintf("krm-fn-sealedsecets-unseal (version=%s, url=%s)", version.Name, version.URL)) - - if err := fn.AsMain(fn.ResourceListProcessorFunc(unseal.Process)); err != nil { + if err := fn.AsMain(fn.ResourceListProcessorFunc(process)); err != nil { os.Exit(1) } } + +func process(rl *fn.ResourceList) (bool, error) { + rl.Results.Infof(fmt.Sprintf("krm-fn-sealedsecets-unseal (version=%s, url=%s)", version.Name, version.URL)) + + return unseal.Process(rl) +}