Files
gh-actions-cache/cmd/root.go

48 lines
858 B
Go
Raw Normal View History

2022-06-10 23:14:02 +05:30
package cmd
import (
"os"
"github.com/spf13/cobra"
)
var rootCmd = &cobra.Command{
Use: "gh-actions-cache",
2022-06-11 02:20:36 +05:30
Short: "Works with GitHub Actions Cache. ",
Long: `Works with GitHub Actions Cache.`,
// Run: func(cmd *cobra.Command, args []string) {},
2022-06-10 23:14:02 +05:30
}
func Execute() {
err := rootCmd.Execute()
if err != nil {
os.Exit(1)
}
}
func init() {
2022-06-11 02:20:36 +05:30
rootCmd.SetHelpTemplate(getRootHelp())
2022-06-10 23:14:02 +05:30
}
2022-06-11 02:20:36 +05:30
func getRootHelp() string {
return `
gh-actions-cache: Works with GitHub Actions Cache.
2022-06-10 23:14:02 +05:30
2022-06-11 02:20:36 +05:30
USAGE:
gh actions-cache <command> [flags]
CORE COMMANDS:
list: list caches with result length cap of 100
delete: delete caches with a key
INHERITED FLAGS
--help Show help for command
EXAMPLES:
$ gh actions-cache list
$ gh actions-cache list --limit 100
$ gh actions-cache list --order desc
$ gh actions-cache delete Linux-node-f5dbf39c9d11eba80242ac13
`
}