@@ -39,7 +39,6 @@ func init() {
3939 groupCmd .AddCommand (groupDeleteCmd )
4040 groupCmd .AddCommand (groupPauseCmd )
4141 groupCmd .AddCommand (groupResumeCmd )
42- groupCmd .AddCommand (groupExportCmd )
4342
4443 // Persistent flags for all group subcommands
4544 groupCmd .PersistentFlags ().IntVar (& groupPage , "page" , 1 , "Page number for paginated results" )
@@ -407,33 +406,6 @@ Examples:
407406 },
408407}
409408
410- // --- EXPORT ---
411- var groupExportCmd = & cobra.Command {
412- Use : "export" ,
413- Short : "Export all groups as JSON" ,
414- Long : `Export all groups by fetching all pages into a single JSON array.
415-
416- Examples:
417- cronitor group export # Print to stdout
418- cronitor group export -o groups.json # Save to file` ,
419- Run : func (cmd * cobra.Command , args []string ) {
420- client := lib .NewAPIClient (dev , log )
421- params := make (map [string ]string )
422-
423- if groupEnv != "" {
424- params ["env" ] = groupEnv
425- }
426-
427- bodies , err := FetchAllPages (client , "/groups" , params , "groups" )
428- if err != nil {
429- Error (fmt .Sprintf ("Failed to export groups: %s" , err ))
430- os .Exit (1 )
431- }
432-
433- outputGroupToTarget (FormatJSON (MergePagedJSON (bodies , "groups" )))
434- },
435- }
436-
437409func init () {
438410 // List command flags
439411 groupListCmd .Flags ().IntVar (& groupPageSize , "page-size" , 0 , "Number of results per page" )
0 commit comments