Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
898714a9
Commit
898714a9
authored
Nov 07, 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
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
106 additions
and
118 deletions
+106
-118
doc/go_tutorial.html
doc/go_tutorial.html
+53
-59
doc/go_tutorial.txt
doc/go_tutorial.txt
+49
-55
doc/progs/cat_rot13.go
doc/progs/cat_rot13.go
+2
-2
doc/progs/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