nf/nft/nfctl/internal/cmd/init.go

26 lines
332 B
Go
Raw Normal View History

2024-12-26 19:40:39 +08:00
package cmd
import (
"context"
"fmt"
"os"
"time"
)
func Init() {
initRoot(
initUpdate(),
initNew(),
)
}
func Run(ctx context.Context) {
if err := rootCmd.ExecuteContext(ctx); err != nil {
fmt.Printf("❌ %s\n", err.Error())
time.Sleep(300 * time.Millisecond)
os.Exit(1)
}
time.Sleep(300 * time.Millisecond)
}