aboutsummaryrefslogtreecommitdiff
path: root/src/lib/fmt
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-01-20 14:40:40 -0800
committerRuss Cox <rsc@golang.org>2009-01-20 14:40:40 -0800
commit839a68469b6f8bf40620a7977041e089bbd0eba3 (patch)
treef8305b165ee5ff41e9ef2b0f76e26f7ab3ece269 /src/lib/fmt
parent0183baaf449338f54727814d079c0254c18226f9 (diff)
downloadgo-839a68469b6f8bf40620a7977041e089bbd0eba3.tar.xz
delete export
TBR=r OCL=23121 CL=23127
Diffstat (limited to 'src/lib/fmt')
-rw-r--r--src/lib/fmt/fmt_test.go10
-rw-r--r--src/lib/fmt/format.go4
-rw-r--r--src/lib/fmt/print.go24
3 files changed, 19 insertions, 19 deletions
diff --git a/src/lib/fmt/fmt_test.go b/src/lib/fmt/fmt_test.go
index 98bbcff2dc..881fd1a366 100644
--- a/src/lib/fmt/fmt_test.go
+++ b/src/lib/fmt/fmt_test.go
@@ -11,7 +11,7 @@ import (
"testing";
)
-export func TestFmtInterface(t *testing.T) {
+func TestFmtInterface(t *testing.T) {
var i1 interface{};
i1 = "abc";
s := fmt.Sprintf("%s", i1);
@@ -150,7 +150,7 @@ var fmttests = []fmtTest{
fmtTest{ "%20g", sys.NaN(), " NaN" },
}
-export func TestSprintf(t *testing.T) {
+func TestSprintf(t *testing.T) {
for i := 0; i < len(fmttests); i++ {
tt := fmttests[i];
s := fmt.Sprintf(tt.fmt, tt.val);
@@ -204,7 +204,7 @@ var flagtests = []flagTest {
flagTest{ "%-1.2abc", "[%-1.2a]bc" },
}
-export func TestFlagParser(t *testing.T) {
+func TestFlagParser(t *testing.T) {
var flagprinter flagPrinter;
for i := 0; i < len(flagtests); i++ {
tt := flagtests[i];
@@ -215,7 +215,7 @@ export func TestFlagParser(t *testing.T) {
}
}
-export func TestStructPrinter(t *testing.T) {
+func TestStructPrinter(t *testing.T) {
var s struct {
a string;
b string;
@@ -241,7 +241,7 @@ export func TestStructPrinter(t *testing.T) {
}
}
-export func TestArrayPrinter(t *testing.T) {
+func TestArrayPrinter(t *testing.T) {
a := []int{1, 2, 3, 4, 5};
want := "[1 2 3 4 5]";
out := fmt.Sprintf("%v", a);
diff --git a/src/lib/fmt/format.go b/src/lib/fmt/format.go
index ef8477764f..e230ec99cd 100644
--- a/src/lib/fmt/format.go
+++ b/src/lib/fmt/format.go
@@ -33,7 +33,7 @@ func init() {
}
}
-export type Fmt struct {
+type Fmt struct {
buf string;
wid int;
wid_present bool;
@@ -68,7 +68,7 @@ func (f *Fmt) init() {
f.clearflags();
}
-export func New() *Fmt {
+func New() *Fmt {
f := new(Fmt);
f.init();
return f;
diff --git a/src/lib/fmt/print.go b/src/lib/fmt/print.go
index 0e75697313..a75e0fff25 100644
--- a/src/lib/fmt/print.go
+++ b/src/lib/fmt/print.go
@@ -20,7 +20,7 @@ import (
// Representation of printer state passed to custom formatters.
// Provides access to the io.Write interface plus information about
// the active formatting verb.
-export type Formatter interface {
+type Formatter interface {
Write(b []byte) (ret int, err *os.Error);
Width() (wid int, ok bool);
Precision() (prec int, ok bool);
@@ -29,11 +29,11 @@ export type Formatter interface {
Flag(int) bool;
}
-export type Format interface {
+type Format interface {
Format(f Formatter, c int);
}
-export type String interface {
+type String interface {
String() string
}
@@ -129,7 +129,7 @@ func (p *pp) doprint(v reflect.StructValue, addspace, addnewline bool);
// These routines end in 'f' and take a format string.
-export func Fprintf(w io.Write, format string, a ...) (n int, error *os.Error) {
+func Fprintf(w io.Write, format string, a ...) (n int, error *os.Error) {
v := reflect.NewValue(a).(reflect.PtrValue).Sub().(reflect.StructValue);
p := newPrinter();
p.doprintf(format, v);
@@ -137,12 +137,12 @@ export func Fprintf(w io.Write, format string, a ...) (n int, error *os.Error) {
return n, error;
}
-export func Printf(format string, v ...) (n int, errno *os.Error) {
+func Printf(format string, v ...) (n int, errno *os.Error) {
n, errno = Fprintf(os.Stdout, format, v);
return n, errno;
}
-export func Sprintf(format string, a ...) string {
+func Sprintf(format string, a ...) string {
v := reflect.NewValue(a).(reflect.PtrValue).Sub().(reflect.StructValue);
p := newPrinter();
p.doprintf(format, v);
@@ -153,7 +153,7 @@ export func Sprintf(format string, a ...) string {
// These routines do not take a format string and add spaces only
// when the operand on neither side is a string.
-export func Fprint(w io.Write, a ...) (n int, error *os.Error) {
+func Fprint(w io.Write, a ...) (n int, error *os.Error) {
v := reflect.NewValue(a).(reflect.PtrValue).Sub().(reflect.StructValue);
p := newPrinter();
p.doprint(v, false, false);
@@ -161,12 +161,12 @@ export func Fprint(w io.Write, a ...) (n int, error *os.Error) {
return n, error;
}
-export func Print(v ...) (n int, errno *os.Error) {
+func Print(v ...) (n int, errno *os.Error) {
n, errno = Fprint(os.Stdout, v);
return n, errno;
}
-export func Sprint(a ...) string {
+func Sprint(a ...) string {
v := reflect.NewValue(a).(reflect.PtrValue).Sub().(reflect.StructValue);
p := newPrinter();
p.doprint(v, false, false);
@@ -178,7 +178,7 @@ export func Sprint(a ...) string {
// always add spaces between operands, and add a newline
// after the last operand.
-export func Fprintln(w io.Write, a ...) (n int, error *os.Error) {
+func Fprintln(w io.Write, a ...) (n int, error *os.Error) {
v := reflect.NewValue(a).(reflect.PtrValue).Sub().(reflect.StructValue);
p := newPrinter();
p.doprint(v, true, true);
@@ -186,12 +186,12 @@ export func Fprintln(w io.Write, a ...) (n int, error *os.Error) {
return n, error;
}
-export func Println(v ...) (n int, errno *os.Error) {
+func Println(v ...) (n int, errno *os.Error) {
n, errno = Fprintln(os.Stdout, v);
return n, errno;
}
-export func Sprintln(a ...) string {
+func Sprintln(a ...) string {
v := reflect.NewValue(a).(reflect.PtrValue).Sub().(reflect.StructValue);
p := newPrinter();
p.doprint(v, true, true);