diff options
author | Rob Pike <r@golang.org> | 2009-01-15 13:48:11 -0800 |
---|---|---|
committer | Rob Pike <r@golang.org> | 2009-01-15 13:48:11 -0800 |
commit | 8024c6e3aec249fcc40b62e8879d30207e879be9 (patch) | |
tree | a72b91ed6b55c7c4635039376af421a98695ad60 /doc/progs | |
parent | d6b313278a61f109ab8b71dd8c77a40ff557b819 (diff) | |
download | golang-8024c6e3aec249fcc40b62e8879d30207e879be9.tar.gz |
printf->Printf etc.
the raw fmt routines will be another, smaller but subtler pass.
R=rsc
DELTA=157 (0 added, 0 deleted, 157 changed)
OCL=22851
CL=22851
Diffstat (limited to 'doc/progs')
-rw-r--r-- | doc/progs/print.go | 8 | ||||
-rw-r--r-- | doc/progs/print_string.go | 4 | ||||
-rw-r--r-- | doc/progs/printf.go | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/doc/progs/print.go b/doc/progs/print.go index ed3f4e269..cc146fed8 100644 --- a/doc/progs/print.go +++ b/doc/progs/print.go @@ -8,13 +8,13 @@ import "fmt" func main() { var u64 uint64 = 1<<64-1; - fmt.printf("%d %d\n", u64, int64(u64)); + fmt.Printf("%d %d\n", u64, int64(u64)); // harder stuff type T struct { a int; b string }; t := T{77, "Sunset Strip"}; a := []int{1, 2, 3, 4}; - fmt.printf("%v %v %v\n", u64, t, a); - fmt.print(u64, " ", t, " ", a, "\n"); - fmt.println(u64, t, a); + fmt.Printf("%v %v %v\n", u64, t, a); + fmt.Print(u64, " ", t, " ", a, "\n"); + fmt.Println(u64, t, a); } diff --git a/doc/progs/print_string.go b/doc/progs/print_string.go index 47d4a4b9d..c435d4eae 100644 --- a/doc/progs/print_string.go +++ b/doc/progs/print_string.go @@ -9,10 +9,10 @@ import "fmt" type T struct { a int; b string } func (t *T) String() string { - return fmt.sprint(t.a) + " " + t.b + return fmt.Sprint(t.a) + " " + t.b } func main() { t := &T{77, "Sunset Strip"}; - fmt.println(t) + fmt.Println(t) } diff --git a/doc/progs/printf.go b/doc/progs/printf.go index be1ac9731..3bd70f264 100644 --- a/doc/progs/printf.go +++ b/doc/progs/printf.go @@ -7,5 +7,5 @@ package main import "fmt" func main() { - fmt.printf("hello, %s\n", "world"); + fmt.Printf("hello, %s\n", "world"); } |