Commit 30c7088c authored by Robert Griesemer's avatar Robert Griesemer

gofmt-ify template, time, unsafe, flag, fmt

(replacement for CLs 1017039, 1017041, 1017040, 1018054)

R=r
http://go/go-review/1018060
parent 1329012a
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
Integer flags accept 1234, 0664, 0x1234 and may be negative. Integer flags accept 1234, 0664, 0x1234 and may be negative.
Boolean flags may be 1, 0, t, f, true, false, TRUE, FALSE, True, False. Boolean flags may be 1, 0, t, f, true, false, TRUE, FALSE, True, False.
*/ */
package flag package flag
import ( import (
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
package flag_test package flag_test
import ( import (
. "flag"; . "flag";
"testing"; "testing";
) )
var ( var (
......
...@@ -5,11 +5,11 @@ ...@@ -5,11 +5,11 @@
package fmt_test package fmt_test
import ( import (
. "fmt"; . "fmt";
"io"; "io";
"math"; "math";
"strings"; "strings";
"testing"; "testing";
) )
func TestFmtInterface(t *testing.T) { func TestFmtInterface(t *testing.T) {
......
...@@ -422,8 +422,8 @@ func (p *pp) printField(field reflect.Value, plus, sharp bool, depth int) (was_s ...@@ -422,8 +422,8 @@ func (p *pp) printField(field reflect.Value, plus, sharp bool, depth int) (was_s
return false; // this value is not a string return false; // this value is not a string
} }
} }
} }
s := ""; s := "";
BigSwitch: BigSwitch:
switch f := field.(type) { switch f := field.(type) {
case *reflect.BoolValue: case *reflect.BoolValue:
......
...@@ -22,11 +22,11 @@ func StringFormatter(w io.Writer, value interface{}, format string) { ...@@ -22,11 +22,11 @@ func StringFormatter(w io.Writer, value interface{}, format string) {
} }
var ( var (
esc_quot = strings.Bytes("""); // shorter than """ esc_quot = strings.Bytes("""); // shorter than """
esc_apos = strings.Bytes("'"); // shorter than "'" esc_apos = strings.Bytes("'"); // shorter than "'"
esc_amp = strings.Bytes("&"); esc_amp = strings.Bytes("&");
esc_lt = strings.Bytes("<"); esc_lt = strings.Bytes("<");
esc_gt = strings.Bytes(">"); esc_gt = strings.Bytes(">");
) )
// HtmlEscape writes to w the properly escaped HTML equivalent // HtmlEscape writes to w the properly escaped HTML equivalent
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
package time_test package time_test
import ( import (
"testing"; "testing";
. "time"; . "time";
) )
func TestTicker(t *testing.T) { func TestTicker(t *testing.T) {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
/* /*
The unsafe package contains operations that step around the type safety of Go programs. The unsafe package contains operations that step around the type safety of Go programs.
*/ */
package unsafe package unsafe
// ArbitraryType is here for the purposes of documentation only and is not actually // ArbitraryType is here for the purposes of documentation only and is not actually
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment