Files
sailpoint-cli/main.go
2023-02-24 14:00:00 -06:00

27 lines
692 B
Go

// Copyright (c) 2021, SailPoint Technologies, Inc. All rights reserved.
package main
import (
"os"
"github.com/sailpoint-oss/sailpoint-cli/cmd/root"
"github.com/spf13/cobra"
)
var rootCmd *cobra.Command
func init() {
rootCmd = root.NewRootCmd()
}
// main the entry point for commands. Note that we do not need to do cobra.CheckErr(err)
// here. When a command returns error, cobra already logs it. Adding CheckErr here will
// cause error messages to be logged twice. We do need to exit with error code if something
// goes wrong. This will exit the cli container during pipeline build and fail that stage.
func main() {
err := rootCmd.Execute()
if err != nil {
os.Exit(1)
}
}