Commit 898714a9 authored by Russ Cox's avatar Russ Cox

tutorial fixes

R=r
CC=go-dev
http://go/go-review/1024014
parent e434f1a7
This diff is collapsed.
This diff is collapsed.
......@@ -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 {
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment