diff options
Diffstat (limited to 'doc/progs')
-rw-r--r-- | doc/progs/cat_rot13.go | 4 | ||||
-rw-r--r-- | doc/progs/echo.go | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/doc/progs/cat_rot13.go b/doc/progs/cat_rot13.go index 870a2d78f..555cecdf4 100644 --- a/doc/progs/cat_rot13.go +++ b/doc/progs/cat_rot13.go @@ -11,7 +11,7 @@ import ( "os"; ) -var rot13_flag = flag.Bool("rot13", false, "rot13 the input") +var rot13Flag = flag.Bool("rot13", false, "rot13 the input") func rot13(b byte) byte { if 'a' <= b && b <= 'z' { @@ -53,7 +53,7 @@ func cat(r reader) { const NBUF = 512; var buf [NBUF]byte; - if *rot13_flag { + if *rot13Flag { r = newRotate13(r) } for { diff --git a/doc/progs/echo.go b/doc/progs/echo.go index caf911733..26a2f68b5 100644 --- a/doc/progs/echo.go +++ b/doc/progs/echo.go @@ -9,7 +9,7 @@ import ( "flag"; // command line option parser ) -var n_flag = flag.Bool("n", false, "don't print final newline") +var omitNewline = flag.Bool("n", false, "don't print final newline") const ( Space = " "; @@ -25,7 +25,7 @@ func main() { } s += flag.Arg(i) } - if !*n_flag { + if !*omitNewline { s += Newline } os.Stdout.WriteString(s); |