Initial import
Some checks failed
Run tests / test (1.25) (push) Has been cancelled
Run tests / test (stable) (push) Has been cancelled

This commit is contained in:
2026-02-22 20:27:07 +01:00
commit fb898bb058
77 changed files with 2719 additions and 0 deletions

27
internal/cmd/all.go Normal file
View File

@@ -0,0 +1,27 @@
package cmd
import (
"errors"
"os"
"os/signal"
"syscall"
"github.com/sirupsen/logrus"
"github.com/urfave/cli/v3"
)
func AllFlags(configFile string) []cli.Flag {
return append(ConfigFlags(configFile), LoggerFlags()...)
}
func WaitForInterrupt(logger *logrus.Logger, what string) error {
sigs := make(chan os.Signal, 1)
signal.Notify(sigs, syscall.SIGINT, syscall.SIGTERM)
logger.Infof("%s: running, interrupt with ^C", what)
for sig := range sigs {
return errors.New("terminating on signal " + sig.String())
}
return nil
}