File tree 1 file changed +42
-0
lines changed
1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,48 @@ func NewRunnerCommand(use string) *cobra.Command {
67
67
return genCmd
68
68
}
69
69
70
+ // Procedural runner command
71
+ // name: the prefix of the scene/screen
72
+ // usecases
73
+ // config path
74
+ func NewProceduralRunnerCommand (use string ) * cobra.Command {
75
+
76
+ var name string
77
+ var usecasesString string
78
+ var configFilePath string
79
+
80
+ genCmd := & cobra.Command {
81
+ Use : use ,
82
+ Short : "generate source & unit tests files" ,
83
+ Run : func (cmd * cobra.Command , args []string ) {
84
+
85
+ fmt .Println ("Please enter the prefix of the scene/screen." )
86
+ fmt .Println ("example: ArticleDetail or ChatList or UserList and so on" )
87
+ fmt .Print ("insert: " )
88
+ fmt .Scanln (& name )
89
+
90
+ fmt .Println ("\n Please enter usecases" )
91
+ fmt .Println ("example: Fetch,Delete,Update" )
92
+ fmt .Print ("insert: " )
93
+ fmt .Scanln (& usecasesString )
94
+
95
+ fmt .Println ("\n Please enter the config file" )
96
+ fmt .Println ("example: ./some_path/some_config.yaml" )
97
+ fmt .Print ("insert: " )
98
+ fmt .Scanln (& configFilePath )
99
+
100
+ run (
101
+ name ,
102
+ usecasesString ,
103
+ "" , // unused
104
+ "" , // unused
105
+ configFilePath ,
106
+ )
107
+ },
108
+ }
109
+ return genCmd
110
+ }
111
+
70
112
func run (
71
113
name string ,
72
114
usecasesString string ,
You can’t perform that action at this time.
0 commit comments