appease gfmrun
This commit is contained in:
parent
daa24f660a
commit
9ab51c32d9
@ -649,6 +649,9 @@ does not provide a required flag, they will be shown an error message.
|
|||||||
|
|
||||||
Take for example this app that reqiures the `lang` flag:
|
Take for example this app that reqiures the `lang` flag:
|
||||||
|
|
||||||
|
<!-- {
|
||||||
|
"error": "Required flag \"lang\" not set"
|
||||||
|
} -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@ -673,7 +676,6 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
app.Action = func(c *cli.Context) error {
|
app.Action = func(c *cli.Context) error {
|
||||||
|
|
||||||
var output string
|
var output string
|
||||||
if c.String("lang") == "spanish" {
|
if c.String("lang") == "spanish" {
|
||||||
output = "Hola"
|
output = "Hola"
|
||||||
@ -681,7 +683,6 @@ func main() {
|
|||||||
output = "Hello"
|
output = "Hello"
|
||||||
}
|
}
|
||||||
fmt.Println(output)
|
fmt.Println(output)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user