1
0
mirror of https://github.com/golang/go synced 2024-10-03 16:41:28 -06:00
go/usr/gri/pretty/selftest2.go
Robert Griesemer 654bc2badc - factored out tabwriter a separate writer filter
(to be moved into std lib eventually)
- rewrote tabwriter to use byte buffers instead of strings
  (byte buffers to be moved into stdlib eventually)
- support for recent syntax changes
- no space printed after function name and before function parameters
- comments still disabled due to a known bug

R=r
OCL=19430
CL=19430
2008-11-17 19:58:52 -08:00

37 lines
579 B
Go

// 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
import Fmt "fmt"
type T struct {
x, y int;
s string;
next_t *T
}
var (
A = 5;
a, b, c int = 0, 0, 0;
foo = "foo";
)
func main() {
// the prologue
for i := 0; i <= 10 /* limit */; i++ {
println(i); // the index
println(i + 1); // the index + 1
println(i + 1000); // the index + 1000
println();
}
// the epilogue
println("foo"); // foo
println("foobar"); // foobar
var x int;
}