forked from tangled.org/core
this repo has no description
1package main 2 3import ( 4 "context" 5 "os" 6 7 "github.com/urfave/cli/v3" 8 "tangled.sh/tangled.sh/core/guard" 9 "tangled.sh/tangled.sh/core/keyfetch" 10 "tangled.sh/tangled.sh/core/knotserver" 11 "tangled.sh/tangled.sh/core/log" 12) 13 14func main() { 15 cmd := &cli.Command{ 16 Name: "knot", 17 Usage: "knot administration and operation tool", 18 Commands: []*cli.Command{ 19 guard.Command(), 20 knotserver.Command(), 21 keyfetch.Command(), 22 }, 23 } 24 25 ctx := context.Background() 26 logger := log.New("knot") 27 ctx = log.IntoContext(ctx, logger.With("command", cmd.Name)) 28 29 if err := cmd.Run(ctx, os.Args); err != nil { 30 logger.Error(err.Error()) 31 os.Exit(-1) 32 } 33}