Create App instance with struct of options
This commit is contained in:
11
main.go
11
main.go
@@ -49,7 +49,16 @@ func main() {
|
||||
cli.ShowAppHelp(c)
|
||||
os.Exit(1)
|
||||
}
|
||||
app := app.New(c.String("addr"), c.String("port"), c.Bool("permit-write"), c.String("credential"), c.Bool("random-url"), c.Args())
|
||||
app := app.New(
|
||||
app.Options{
|
||||
c.String("addr"),
|
||||
c.String("port"),
|
||||
c.Bool("permit-write"),
|
||||
c.String("credential"),
|
||||
c.Bool("random-url"),
|
||||
c.Args(),
|
||||
},
|
||||
)
|
||||
err := app.Run()
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
|
||||
Reference in New Issue
Block a user