Add a "fission function edit" command

The new command invokes editor on a copy of the source code, and
uploads the new source code.  It's an easy way to manually edit
functions from a terminal.
This commit is contained in:
Soam Vasani
2016-11-15 15:51:47 -08:00
parent 2a9f229c17
commit 1a19f718d4
2 changed files with 54 additions and 0 deletions
+1
View File
@@ -39,6 +39,7 @@ func main() {
fnSubcommands := []cli.Command{
{Name: "create", Usage: "Create new function", Flags: []cli.Flag{fnNameFlag, fnEnvNameFlag, fnCodeFlag}, Action: fnCreate},
{Name: "get", Usage: "Get function source code", Flags: []cli.Flag{fnNameFlag, fnUidFlag}, Action: fnGet},
{Name: "edit", Usage: "Edit function source code in $EDITOR", Flags: []cli.Flag{fnNameFlag, fnUidFlag}, Action: fnEdit},
{Name: "getmeta", Usage: "Get function metadata", Flags: []cli.Flag{fnNameFlag, fnUidFlag}, Action: fnGetMeta},
{Name: "update", Usage: "Update function source code", Flags: []cli.Flag{fnNameFlag, fnEnvNameFlag, fnCodeFlag}, Action: fnUpdate},
{Name: "delete", Usage: "Delete function", Flags: []cli.Flag{fnNameFlag, fnUidFlag}, Action: fnDelete},