Random URL generation(Close #17)
This commit is contained in:
7
main.go
7
main.go
@@ -37,6 +37,11 @@ func main() {
|
||||
Usage: "Credential for Basic Authentication (ex: user:pass)",
|
||||
EnvVar: "GOTTY_CREDENTIAL",
|
||||
},
|
||||
cli.BoolFlag{
|
||||
Name: "random-url, r",
|
||||
Usage: "Add a random string to the URL",
|
||||
EnvVar: "GOTTY_RANDOM_URL",
|
||||
},
|
||||
}
|
||||
cmd.Action = func(c *cli.Context) {
|
||||
if len(c.Args()) == 0 {
|
||||
@@ -44,7 +49,7 @@ 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.Args())
|
||||
app := app.New(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