mirror of
https://github.com/go-kratos/kratos.git
synced 2025-03-17 21:07:54 +02:00
Update run.go (#2025)
This commit is contained in:
parent
c1dbc2dbd3
commit
bbb96f1e1f
@ -38,14 +38,15 @@ func Run(cmd *cobra.Command, args []string) {
|
||||
fmt.Fprintf(os.Stderr, "\033[31mERROR: %s\033[m\n", err)
|
||||
return
|
||||
}
|
||||
if len(cmdPath) == 0 {
|
||||
switch len(cmdPath) {
|
||||
case 0:
|
||||
fmt.Fprintf(os.Stderr, "\033[31mERROR: %s\033[m\n", "The cmd directory cannot be found in the current directory")
|
||||
return
|
||||
} else if len(cmdPath) == 1 {
|
||||
case 1:
|
||||
for _, v := range cmdPath {
|
||||
dir = v
|
||||
}
|
||||
} else {
|
||||
default:
|
||||
var cmdPaths []string
|
||||
for k := range cmdPath {
|
||||
cmdPaths = append(cmdPaths, k)
|
||||
|
Loading…
x
Reference in New Issue
Block a user