diff options
author | Rob Pike <r@golang.org> | 2008-09-11 10:21:02 -0700 |
---|---|---|
committer | Rob Pike <r@golang.org> | 2008-09-11 10:21:02 -0700 |
commit | 7677ea815dda07ea7a8a61c5726236574e4e3f49 (patch) | |
tree | 9029a8e180e733c86dfd6dd301eeaec55c70b0dc /doc/progs/strings.go | |
parent | f937b9e76b9e99b08a64c7a78f7ae9042399f376 (diff) | |
download | golang-7677ea815dda07ea7a8a61c5726236574e4e3f49.tar.gz |
add sections about types and constants
R=gri
DELTA=133 (124 added, 0 deleted, 9 changed)
OCL=15122
CL=15143
Diffstat (limited to 'doc/progs/strings.go')
-rw-r--r-- | doc/progs/strings.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/progs/strings.go b/doc/progs/strings.go new file mode 100644 index 000000000..28553c26a --- /dev/null +++ b/doc/progs/strings.go @@ -0,0 +1,13 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package main + +func main() { + s := "hello"; + if s[1] == 'e' { print("success") } + s = "good bye"; + var p *string = &s; + *p = "ciao"; +} |