From 54c88a9d43799a0d4ae2f45ef8f08e86fa00e2f9 Mon Sep 17 00:00:00 2001 From: Julia Ogris Date: Tue, 26 Nov 2019 10:51:19 +1100 Subject: [PATCH] Fix hook sample in README.md. Update `debugFlag` in hook code listing to be `type` rather than `var` so that the code listing compiles. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e8294c4..a969f61 100644 --- a/README.md +++ b/README.md @@ -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)