Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
898714a9
Commit
898714a9
authored
Nov 08, 2009
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tutorial fixes
R=r CC=go-dev
http://go/go-review/1024014
parent
e434f1a7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
go_tutorial.html
doc/go_tutorial.html
+0
-0
go_tutorial.txt
doc/go_tutorial.txt
+0
-0
cat_rot13.go
doc/progs/cat_rot13.go
+2
-2
echo.go
doc/progs/echo.go
+2
-2
No files found.
doc/go_tutorial.html
View file @
898714a9
This diff is collapsed.
Click to expand it.
doc/go_tutorial.txt
View file @
898714a9
This diff is collapsed.
Click to expand it.
doc/progs/cat_rot13.go
View file @
898714a9
...
...
@@ -11,7 +11,7 @@ import (
"os"
;
)
var
rot13
_f
lag
=
flag
.
Bool
(
"rot13"
,
false
,
"rot13 the input"
)
var
rot13
F
lag
=
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
_f
lag
{
if
*
rot13
F
lag
{
r
=
newRotate13
(
r
)
}
for
{
...
...
doc/progs/echo.go
View file @
898714a9
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment