feature 1.1.5 (#411)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package new
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
@@ -35,6 +36,10 @@ func CreateServiceCommand(c *cli.Context) error {
|
||||
dirName = "greet"
|
||||
}
|
||||
|
||||
if strings.Contains(dirName, "-") {
|
||||
return errors.New("api new command service name not support strikethrough, because this will used by function name")
|
||||
}
|
||||
|
||||
abs, err := filepath.Abs(dirName)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user