INNER CODE UNIT · Go
main
kptdev/kpt · main.go:40
func main() {
// Handle all setup in the runMain function so os.Exit doesn't interfere
// with defer.
os.Exit(runMain())
}
// runMain does the initial setup in order to run kpt. The return value from
// this function will be the exit code when kpt terminates.
func runMain() int {
var err error
ctx := context.Background()
// Enable commandline flags for klog.
// logging will help in collecting debugging information from users
klog.InitFlags(nil)
cmd := run.GetMain(ctx)