mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Fixes async payload passing for #68.
This commit is contained in:
13
fn/init.go
13
fn/init.go
@@ -50,6 +50,7 @@ type initFnCmd struct {
|
||||
entrypoint string
|
||||
cmd string
|
||||
format string
|
||||
typeS string
|
||||
}
|
||||
|
||||
func initFn() cli.Command {
|
||||
@@ -83,6 +84,12 @@ func initFn() cli.Command {
|
||||
Destination: &a.format,
|
||||
Value: "",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "type",
|
||||
Usage: "sync or async",
|
||||
Destination: &a.typeS,
|
||||
Value: "",
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -124,10 +131,14 @@ func (a *initFnCmd) init(c *cli.Context) error {
|
||||
Entrypoint: a.entrypoint,
|
||||
Cmd: a.cmd,
|
||||
Format: ffmt,
|
||||
Type: &a.typeS,
|
||||
}
|
||||
if ff.Type != nil && *ff.Type == "" {
|
||||
ff.Type = nil
|
||||
}
|
||||
|
||||
_, path := appNamePath(ff.FullName())
|
||||
ff.Path = &path
|
||||
ff.Path = path
|
||||
|
||||
if err := encodeFuncfileYAML("func.yaml", ff); err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user