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 | 886b5d5ad8190ca7e49221fd69091e5a9bf7b914 (patch) | |
tree | 9029a8e180e733c86dfd6dd301eeaec55c70b0dc /doc/progs/strings.go | |
parent | 5a95ea84656ecd0abfbb14322c647b5779282075 (diff) | |
download | go-886b5d5ad8190ca7e49221fd69091e5a9bf7b914.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"; +} |