Skip to content

Commit

Permalink
log version to stderr instead of result
Browse files Browse the repository at this point in the history
  • Loading branch information
jashandeep-sohi committed Aug 7, 2024
1 parent 9089d4d commit bd00f7f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
10 changes: 3 additions & 7 deletions cmd/seal/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,9 @@ import (
)

func main() {
if err := fn.AsMain(fn.ResourceListProcessorFunc(process)); err != nil {
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 {
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)
}
10 changes: 3 additions & 7 deletions cmd/unseal/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,9 @@ import (
)

func main() {
if err := fn.AsMain(fn.ResourceListProcessorFunc(process)); err != nil {
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 {
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)
}

0 comments on commit bd00f7f

Please sign in to comment.