mirror of
https://github.com/yudai/gotty.git
synced 2026-01-06 09:38:51 +01:00
Create App instance with struct of options
This commit is contained in:
parent
e09d6e0486
commit
ce96943af2
2 changed files with 24 additions and 16 deletions
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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue