mirror of
https://github.com/golang/go
synced 2024-11-20 10:04:45 -07:00
3c2f0ae132
- implemented elastic tabstops algorithm, now correct and documented - first cut at printing comments (use -comments flag, disabled for now) - struct field types are now aligned (using elastic tab stops) - needs more fine-tuning * fixed a bug in test script * added quick smoke test to makefile and invoke it in run.bash instead of the full test R=r OCL=19220 CL=19220
37 lines
575 B
Go
37 lines
575 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 prolog
|
|
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 epilog
|
|
println("foo"); // foo
|
|
println("foobar"); // foobar
|
|
var x int;
|
|
}
|