Skip to content

Commit

Permalink
Merge branch 'main' into aggregator-client-certs
Browse files Browse the repository at this point in the history
  • Loading branch information
s-l-teichmann committed Aug 15, 2023
2 parents 38dfabd + d42db07 commit 411d6ff
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions cmd/csaf_aggregator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,13 @@ package main

import (
"fmt"
"log"
"os"
"path/filepath"

"github.com/csaf-poc/csaf_distribution/v2/internal/options"
"github.com/gofrs/flock"
"github.com/jessevdk/go-flags"
)

func errCheck(err error) {
if err != nil {
if flags.WroteHelp(err) {
os.Exit(0)
}
log.Fatalf("error: %v\n", err)
}
}

func lock(lockFile *string, fn func() error) error {
if lockFile == nil {
// No locking configured.
Expand Down Expand Up @@ -57,7 +46,6 @@ func main() {
_, cfg, err := parseArgsConfig()
options.ErrorCheck(err)
options.ErrorCheck(cfg.prepare())

p := processor{cfg: cfg}
errCheck(lock(cfg.LockFile, p.process))
options.ErrorCheck(lock(cfg.LockFile, p.process))
}

0 comments on commit 411d6ff

Please sign in to comment.