Files
lincodex/backend/cmd/policy-publish/main.go
T

30 lines
641 B
Go

// Command policy-publish adds the demo matching section to the product
// policy of a stand. It publishes a new immutable version and changes nothing
// else.
package main
import (
"context"
"fmt"
"os"
"os/signal"
"syscall"
"time"
"lincodex/backend/internal/adapter/primary/cli/policypublish"
)
func main() {
os.Exit(run())
}
func run() int {
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
defer stop()
if err := policypublish.Run(ctx, os.Args[1:], os.LookupEnv, os.Stdout, time.Now); err != nil {
_, _ = fmt.Fprintf(os.Stderr, "policy-publish: %v\n", err)
return 2
}
return 0
}