Use error.New () directly to output the error message

Signed-off-by: fate-grand-order <chenjg@harmonycloud.cn>
This commit is contained in:
fate-grand-order 2017-02-10 12:32:11 +08:00
parent 696e88c813
commit af86cd4d2f
8 changed files with 13 additions and 12 deletions

View file

@ -110,7 +110,7 @@ func main() {
debugPath := context.GlobalString("debug-socket")
if debugPath == "" {
return fmt.Errorf("--debug-socket path cannot be empty")
return errors.New("--debug-socket path cannot be empty")
}
d, err := utils.CreateUnixSocket(debugPath)
if err != nil {
@ -125,7 +125,7 @@ func main() {
path := context.GlobalString("socket")
if path == "" {
return fmt.Errorf("--socket path cannot be empty")
return errors.New("--socket path cannot be empty")
}
l, err := utils.CreateUnixSocket(path)
if err != nil {