add(new command schema)
This commit is contained in:
1 parent
fcafab05d1
commit
f32d9a80b0
16 files changed
+306
-77
No files matched your search
+2
-3
@@ -1,7 +1,6 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/codegangsta/cli"
|
||||
"github.com/tidwall/sjson"
|
||||
)
|
||||
@@ -20,7 +19,7 @@ type deleteCommand struct{}
|
||||
|
||||
func (d deleteCommand) action(c *cli.Context) {
|
||||
if err := checkFlags(c); err != nil {
|
||||
fmt.Println(err)
|
||||
printError(err)
|
||||
return
|
||||
}
|
||||
moduleName := c.Args().First()
|
||||
@@ -40,7 +39,7 @@ func (d deleteCommand) action(c *cli.Context) {
|
||||
createUpdateConfig("", moduleConfiguration)
|
||||
} else {
|
||||
if stringToChange, err := sjson.Delete(string(jsonObject), pathObject); err != nil {
|
||||
fmt.Println(err)
|
||||
printError(err)
|
||||
return
|
||||
} else {
|
||||
createUpdateConfig(stringToChange, moduleConfiguration)
|
||||
|
||||
Reference in new issue
Block a user