From d47dea3932793a35410cc5accf7290c5a09813bb Mon Sep 17 00:00:00 2001 From: Gautam Kotian Date: Mon, 13 Sep 2021 22:31:36 +0200 Subject: [PATCH] Rename `boolPtr` to `forkPtr` This is in order to be consistent with the other flags `wordPtr` & `numbPtr` which are based on the name of the flag and not the type of the flag. --- examples/command-line-flags/command-line-flags.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/command-line-flags/command-line-flags.go b/examples/command-line-flags/command-line-flags.go index 96647f5..886de07 100644 --- a/examples/command-line-flags/command-line-flags.go +++ b/examples/command-line-flags/command-line-flags.go @@ -26,7 +26,7 @@ func main() { // This declares `numb` and `fork` flags, using a // similar approach to the `word` flag. numbPtr := flag.Int("numb", 42, "an int") - boolPtr := flag.Bool("fork", false, "a bool") + forkPtr := flag.Bool("fork", false, "a bool") // It's also possible to declare an option that uses an // existing var declared elsewhere in the program. @@ -45,7 +45,7 @@ func main() { // to get the actual option values. fmt.Println("word:", *wordPtr) fmt.Println("numb:", *numbPtr) - fmt.Println("fork:", *boolPtr) + fmt.Println("fork:", *forkPtr) fmt.Println("svar:", svar) fmt.Println("tail:", flag.Args()) }