-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
testing moving to using packages per sommand set
- Loading branch information
Showing
6 changed files
with
91 additions
and
6 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
Copyright © 2024 NAME HERE [email protected] | ||
*/ | ||
package backup | ||
|
||
import ( | ||
"log" | ||
|
||
"github.com/dilerous/cnvrgctl/cmd" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
// bucketCmd represents the bucket command | ||
var bucketCmd = &cobra.Command{ | ||
Use: "bucket", | ||
Short: "Backup the S3 bucket", | ||
Long: `The command will backup the bucket used to host the files and | ||
datasets in the cnvrg environment. For example: | ||
Cobra is a CLI library for Go that empowers applications. | ||
This application is a tool to generate the needed files | ||
to quickly create a Cobra application.`, | ||
Run: func(cmd *cobra.Command, args []string) { | ||
log.Println("bucket called") | ||
}, | ||
} | ||
|
||
func init() { | ||
cmd.RootCmd.AddCommand(bucketCmd) | ||
|
||
// Here you will define your flags and configuration settings. | ||
|
||
// Cobra supports Persistent Flags which will work for this command | ||
// and all subcommands, e.g.: | ||
// bucketCmd.PersistentFlags().String("foo", "", "A help for foo") | ||
|
||
// Cobra supports local flags which will only run when this command | ||
// is called directly, e.g.: | ||
// bucketCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
Copyright © 2024 NAME HERE <EMAIL ADDRESS> | ||
*/ | ||
package backup | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/dilerous/cnvrgctl/cmd" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
// databaseCmd represents the database command | ||
var databaseCmd = &cobra.Command{ | ||
Use: "database", | ||
Short: "A brief description of your command", | ||
Long: `A longer description that spans multiple lines and likely contains examples | ||
and usage of using your command. For example: | ||
Cobra is a CLI library for Go that empowers applications. | ||
This application is a tool to generate the needed files | ||
to quickly create a Cobra application.`, | ||
Run: func(cmd *cobra.Command, args []string) { | ||
fmt.Println("database called") | ||
|
||
// cmd.ConnectToK8s | ||
}, | ||
} | ||
|
||
func init() { | ||
cmd.RootCmd.AddCommand(databaseCmd) | ||
|
||
// Here you will define your flags and configuration settings. | ||
|
||
// Cobra supports Persistent Flags which will work for this command | ||
// and all subcommands, e.g.: | ||
// databaseCmd.PersistentFlags().String("foo", "", "A help for foo") | ||
|
||
// Cobra supports local flags which will only run when this command | ||
// is called directly, e.g.: | ||
// databaseCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ Copyright © 2024 Brad Soper [email protected] | |
package main | ||
|
||
import ( | ||
_ "github.com/dilerous/cnvrgctl/backup" | ||
"github.com/dilerous/cnvrgctl/cmd" | ||
) | ||
|
||
|