environmentCaptureAgent/main.go

28 lines
429 B
Go
Raw Permalink Normal View History

2023-02-28 09:56:20 +08:00
package main
import (
2023-03-01 11:36:19 +08:00
"environmentCaptureAgent/cmd"
2023-02-28 09:56:20 +08:00
"fmt"
"github.com/spf13/cobra"
"os"
)
var (
rootCmd = &cobra.Command{
Use: "hpds_environment_capture_agent",
Long: "hpds_agent is a environment capture agent",
Version: "0.1",
}
)
func init() {
rootCmd.AddCommand(cmd.NewStartCmd())
}
func main() {
if err := rootCmd.Execute(); err != nil {
2023-03-01 11:36:19 +08:00
_, _ = fmt.Fprint(os.Stderr, err.Error())
2023-02-28 09:56:20 +08:00
os.Exit(1)
}
}