//NewImportConnectorsCommand create `import connectors`
NewImportConnectorsCommand create `import connectors`
// NewImportConnectorsCommand create ` import connectors `
func NewImportConnectorsCommand() *cobra.Command {
	var path string
	var interval string
	var retries int
	cmd := &cobra.Command{
		Use:              "connectors",
		Short:            "connectors",
		Example:          `import connectors --landscape /my-landscape --ignore-errors`,
		SilenceErrors:    true,
		TraverseChildren: true,
		RunE: func(cmd *cobra.Command, args []string) error {
			path = fmt.Sprintf("%s/%s", path, pkg.ConnectorsPath)
			if err := loadConnectors(config.Client, cmd, path, interval, retries); err != nil {
				return fmt.Errorf("failed to load connectors. [%s]", err.Error())
			}
			return nil
		},
	}
	cmd.Flags().StringVar(&path, "dir", ".", "Base directory to import")
	cmd.Flags().StringVar(&interval, "interval", "0s", "Time between importing two connectors")
	cmd.Flags().IntVar(&retries, "retries", 5, "Number of HTTP retries before exiting")
	bite.CanPrintJSON(cmd)
	bite.CanBeSilent(cmd)
	cmd.Flags().Set("silent", "true")
	return cmd
}
func NewImportConnectorsCommand ( ) * cobra . Command { var path string var interval string var retries int cmd := & cobra . Command { Use : " " , Short : " " , Example : `import connectors --landscape /my-landscape --ignore-errors` , SilenceErrors : true , TraverseChildren : true , RunE : func ( cmd * cobra . Command , args [ ] string ) error { path = fmt . Sprintf ( " " , path , pkg . ConnectorsPath ) if err := loadConnectors ( config . Client , cmd , path , interval , retries ) ; err != nil { return fmt . Errorf ( " " , err . Error ( ) ) } return nil } , } cmd . Flags ( ) . StringVar ( & path , " " , " " , " " ) cmd . Flags ( ) . StringVar ( & interval , " " , " " , " " ) cmd . Flags ( ) . IntVar ( & retries , " " , 5 , " " ) bite . CanPrintJSON ( cmd ) bite . CanBeSilent ( cmd ) cmd . Flags ( ) . Set ( " " , " " ) return cmd }
NewImportConnectorsCommand create `import connectors`
NewImportConnectorsCommand create ` import connectors `