File tree Expand file tree Collapse file tree 10 files changed +85
-15
lines changed
Expand file tree Collapse file tree 10 files changed +85
-15
lines changed File renamed without changes.
Original file line number Diff line number Diff line change 1+ todo
Original file line number Diff line number Diff line change 1+ package cmd
2+
3+ import (
4+ "github.com/devstream-io/devstream/internal/pkg/git"
5+ "github.com/spf13/cobra"
6+ )
7+
8+ // gitCmd represents the git command
9+ var gitCmd = & cobra.Command {
10+ Use : "git" ,
11+ Short : "git is used to execute git operations" ,
12+ Long : `git is used to execute git operations` ,
13+ Run : func (cmd * cobra.Command , args []string ) {
14+ git .Run ()
15+ },
16+ }
17+
18+ func init () {
19+ rootCmd .AddCommand (gitCmd )
20+ }
Original file line number Diff line number Diff line change 1+ package cmd
2+
3+ import (
4+ "github.com/devstream-io/devstream/internal/pkg/github"
5+ "github.com/spf13/cobra"
6+ )
7+
8+ // githubCmd represents the github command
9+ var githubCmd = & cobra.Command {
10+ Use : "github" ,
11+ Short : "github is used to execute github operations" ,
12+ Long : `github is used to execute github operations` ,
13+ Run : func (cmd * cobra.Command , args []string ) {
14+ github .Run ()
15+ },
16+ }
17+
18+ func init () {
19+ rootCmd .AddCommand (githubCmd )
20+ }
Original file line number Diff line number Diff line change 1+ package cmd
2+
3+ import (
4+ "github.com/devstream-io/devstream/internal/pkg/osx"
5+ "github.com/spf13/cobra"
6+ )
7+
8+ // osCmd represents the os command
9+ var osCmd = & cobra.Command {
10+ Use : "os" ,
11+ Short : "os is used to execute os operations" ,
12+ Long : `os is used to execute os operations` ,
13+ Run : func (cmd * cobra.Command , args []string ) {
14+ osx .Run ()
15+ },
16+ }
17+
18+ func init () {
19+ rootCmd .AddCommand (osCmd )
20+ }
Original file line number Diff line number Diff line change 1- /*
2- Copyright © 2023 NAME HERE <EMAIL ADDRESS>
3-
4- */
51package cmd
62
73import (
@@ -16,17 +12,9 @@ var cfgFile string
1612
1713// rootCmd represents the base command when called without any subcommands
1814var rootCmd = & cobra.Command {
19- Use : "devstream" ,
20- Short : "A brief description of your application" ,
21- Long : `A longer description that spans multiple lines and likely contains
22- examples and usage of using your application. For example:
23-
24- Cobra is a CLI library for Go that empowers applications.
25- This application is a tool to generate the needed files
26- to quickly create a Cobra application.` ,
27- // Uncomment the following line if your bare application
28- // has an action associated with it:
29- // Run: func(cmd *cobra.Command, args []string) { },
15+ Use : "dtm" ,
16+ Short : "dtm is a tool to manage variaties of development platforms" ,
17+ Long : `dtm is a tool to manage variaties of development platforms.` ,
3018}
3119
3220// Execute adds all child commands to the root command and sets flags appropriately.
Original file line number Diff line number Diff line change 1+ package git
2+
3+ import "fmt"
4+
5+ func Run () {
6+ fmt .Println ("git called" )
7+ }
Original file line number Diff line number Diff line change 1+ package github
2+
3+ import "fmt"
4+
5+ func Run () {
6+ fmt .Println ("github called" )
7+ }
Original file line number Diff line number Diff line change 1+ package osx
2+
3+ import "fmt"
4+
5+ func Run () {
6+ fmt .Println ("os called" )
7+ }
You can’t perform that action at this time.
0 commit comments