Fix hook sample in README.md.

Update `debugFlag` in hook code listing to be `type` rather than `var`
so that the code listing compiles.
This commit is contained in:
Julia Ogris
2019-11-26 10:51:19 +11:00
committed by Alec Thomas
parent a341a59d82
commit 54c88a9d43
+1 -1
View File
@@ -230,7 +230,7 @@ eg.
```go
// A flag with a hook that, if triggered, will set the debug loggers output to stdout.
var debugFlag bool
type debugFlag bool
func (d debugFlag) BeforeApply(logger *log.Logger) error {
logger.SetOutput(os.Stdout)