diff options
| author | Russ Cox <rsc@golang.org> | 2009-01-20 14:40:40 -0800 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2009-01-20 14:40:40 -0800 |
| commit | 839a68469b6f8bf40620a7977041e089bbd0eba3 (patch) | |
| tree | f8305b165ee5ff41e9ef2b0f76e26f7ab3ece269 /src/lib/strconv | |
| parent | 0183baaf449338f54727814d079c0254c18226f9 (diff) | |
| download | go-839a68469b6f8bf40620a7977041e089bbd0eba3.tar.xz | |
delete export
TBR=r
OCL=23121
CL=23127
Diffstat (limited to 'src/lib/strconv')
| -rw-r--r-- | src/lib/strconv/atof.go | 6 | ||||
| -rw-r--r-- | src/lib/strconv/atof_test.go | 4 | ||||
| -rw-r--r-- | src/lib/strconv/atoi.go | 8 | ||||
| -rw-r--r-- | src/lib/strconv/atoi_test.go | 8 | ||||
| -rw-r--r-- | src/lib/strconv/decimal_test.go | 6 | ||||
| -rw-r--r-- | src/lib/strconv/fp_test.go | 2 | ||||
| -rw-r--r-- | src/lib/strconv/ftoa.go | 8 | ||||
| -rw-r--r-- | src/lib/strconv/ftoa_test.go | 2 | ||||
| -rw-r--r-- | src/lib/strconv/itoa.go | 4 | ||||
| -rw-r--r-- | src/lib/strconv/itoa_test.go | 2 | ||||
| -rw-r--r-- | src/lib/strconv/quote.go | 4 | ||||
| -rw-r--r-- | src/lib/strconv/quote_test.go | 4 |
12 files changed, 29 insertions, 29 deletions
diff --git a/src/lib/strconv/atof.go b/src/lib/strconv/atof.go index 147b7955b2..e562bfdb33 100644 --- a/src/lib/strconv/atof.go +++ b/src/lib/strconv/atof.go @@ -318,7 +318,7 @@ func decimalAtof32(neg bool, d *decimal, trunc bool) (f float32, ok bool) { // If s is syntactically well-formed but is more than 1/2 ULP // away from the largest floating point number of the given size, // returns f = ±Inf, err = os.ERANGE. -export func Atof64(s string) (f float64, err *os.Error) { +func Atof64(s string) (f float64, err *os.Error) { neg, d, trunc, ok := stringToDecimal(s); if !ok { return 0, os.EINVAL; @@ -336,7 +336,7 @@ export func Atof64(s string) (f float64, err *os.Error) { return f, err } -export func Atof32(s string) (f float32, err *os.Error) { +func Atof32(s string) (f float32, err *os.Error) { neg, d, trunc, ok := stringToDecimal(s); if !ok { return 0, os.EINVAL; @@ -354,7 +354,7 @@ export func Atof32(s string) (f float32, err *os.Error) { return f, err } -export func Atof(s string) (f float, err *os.Error) { +func Atof(s string) (f float, err *os.Error) { if FloatSize == 32 { f1, err1 := Atof32(s); return float(f1), err1; diff --git a/src/lib/strconv/atof_test.go b/src/lib/strconv/atof_test.go index 493829b570..7f1f0a1312 100644 --- a/src/lib/strconv/atof_test.go +++ b/src/lib/strconv/atof_test.go @@ -124,10 +124,10 @@ func testAtof(t *testing.T, opt bool) { strconv.optimize = oldopt; } -export func TestAtof(t *testing.T) { +func TestAtof(t *testing.T) { testAtof(t, true); } -export func TestAtofSlow(t *testing.T) { +func TestAtofSlow(t *testing.T) { testAtof(t, false); } diff --git a/src/lib/strconv/atoi.go b/src/lib/strconv/atoi.go index 1c5d112cf3..b41d08e147 100644 --- a/src/lib/strconv/atoi.go +++ b/src/lib/strconv/atoi.go @@ -15,7 +15,7 @@ func computeIntsize() uint { var intsize = computeIntsize(); // Convert decimal string to unsigned integer. -export func Atoui64(s string) (i uint64, err *os.Error) { +func Atoui64(s string) (i uint64, err *os.Error) { // empty string bad if len(s) == 0 { return 0, os.EINVAL @@ -52,7 +52,7 @@ export func Atoui64(s string) (i uint64, err *os.Error) { } // Convert decimal string to integer. -export func Atoi64(s string) (i int64, err *os.Error) { +func Atoi64(s string) (i int64, err *os.Error) { // empty string bad if len(s) == 0 { return 0, os.EINVAL @@ -85,7 +85,7 @@ export func Atoi64(s string) (i int64, err *os.Error) { return n, nil } -export func Atoui(s string) (i uint, err *os.Error) { +func Atoui(s string) (i uint, err *os.Error) { i1, e1 := Atoui64(s); if e1 != nil && e1 != os.ERANGE { return 0, e1 @@ -99,7 +99,7 @@ export func Atoui(s string) (i uint, err *os.Error) { return i, nil } -export func Atoi(s string) (i int, err *os.Error) { +func Atoi(s string) (i int, err *os.Error) { i1, e1 := Atoi64(s); if e1 != nil && e1 != os.ERANGE { return 0, e1 diff --git a/src/lib/strconv/atoi_test.go b/src/lib/strconv/atoi_test.go index 41a6f4b76f..5ffda142e6 100644 --- a/src/lib/strconv/atoi_test.go +++ b/src/lib/strconv/atoi_test.go @@ -103,7 +103,7 @@ var atoi32tests = []atoi32Test { atoi32Test{ "-2147483649", -1<<31, os.ERANGE }, } -export func TestAtoui64(t *testing.T) { +func TestAtoui64(t *testing.T) { for i := 0; i < len(atoui64tests); i++ { test := &atoui64tests[i]; out, err := strconv.Atoui64(test.in); @@ -114,7 +114,7 @@ export func TestAtoui64(t *testing.T) { } } -export func TestAtoi64(t *testing.T) { +func TestAtoi64(t *testing.T) { for i := 0; i < len(atoi64test); i++ { test := &atoi64test[i]; out, err := strconv.Atoi64(test.in); @@ -125,7 +125,7 @@ export func TestAtoi64(t *testing.T) { } } -export func TestAtoui(t *testing.T) { +func TestAtoui(t *testing.T) { switch intsize { case 32: for i := 0; i < len(atoui32tests); i++ { @@ -148,7 +148,7 @@ export func TestAtoui(t *testing.T) { } } -export func TestAtoi(t *testing.T) { +func TestAtoi(t *testing.T) { switch intsize { case 32: for i := 0; i < len(atoi32tests); i++ { diff --git a/src/lib/strconv/decimal_test.go b/src/lib/strconv/decimal_test.go index 55fcbdd6b5..bc82861bdd 100644 --- a/src/lib/strconv/decimal_test.go +++ b/src/lib/strconv/decimal_test.go @@ -29,7 +29,7 @@ var shifttests = []shiftTest { shiftTest{ 1953125, 9, "1000000000" }, } -export func TestDecimalShift(t *testing.T) { +func TestDecimalShift(t *testing.T) { ok := true; for i := 0; i < len(shifttests); i++ { test := &shifttests[i]; @@ -66,7 +66,7 @@ var roundtests = []roundTest { roundTest{ 12999999, 4, "12990000", "13000000", "13000000", 13000000 }, } -export func TestDecimalRound(t *testing.T) { +func TestDecimalRound(t *testing.T) { for i := 0; i < len(roundtests); i++ { test := &roundtests[i]; s := strconv.newDecimal(test.i).RoundDown(test.nd).String(); @@ -106,7 +106,7 @@ var roundinttests = []roundIntTest { roundIntTest{ 1000, 0, 1000 }, } -export func TestDecimalRoundedInteger(t *testing.T) { +func TestDecimalRoundedInteger(t *testing.T) { for i := 0; i < len(roundinttests); i++ { test := roundinttests[i]; // TODO: should be able to use int := here. diff --git a/src/lib/strconv/fp_test.go b/src/lib/strconv/fp_test.go index f0cfad0bb9..6738ed75e1 100644 --- a/src/lib/strconv/fp_test.go +++ b/src/lib/strconv/fp_test.go @@ -92,7 +92,7 @@ func myatof32(s string) (f float32, ok bool) { return f1, true; } -export func TestFp(t *testing.T) { +func TestFp(t *testing.T) { fd, err := os.Open("testfp.txt", os.O_RDONLY, 0); if err != nil { panicln("testfp: open testfp.txt:", err.String()); diff --git a/src/lib/strconv/ftoa.go b/src/lib/strconv/ftoa.go index 355680fb7b..c4951873d0 100644 --- a/src/lib/strconv/ftoa.go +++ b/src/lib/strconv/ftoa.go @@ -38,17 +38,17 @@ func floatsize() int { } return 64; } -export var FloatSize = floatsize() +var FloatSize = floatsize() -export func Ftoa32(f float32, fmt byte, prec int) string { +func Ftoa32(f float32, fmt byte, prec int) string { return genericFtoa(uint64(sys.Float32bits(f)), fmt, prec, &float32info); } -export func Ftoa64(f float64, fmt byte, prec int) string { +func Ftoa64(f float64, fmt byte, prec int) string { return genericFtoa(sys.Float64bits(f), fmt, prec, &float64info); } -export func Ftoa(f float, fmt byte, prec int) string { +func Ftoa(f float, fmt byte, prec int) string { if FloatSize == 32 { return Ftoa32(float32(f), fmt, prec); } diff --git a/src/lib/strconv/ftoa_test.go b/src/lib/strconv/ftoa_test.go index 61ce38cff1..309f028700 100644 --- a/src/lib/strconv/ftoa_test.go +++ b/src/lib/strconv/ftoa_test.go @@ -98,7 +98,7 @@ var ftoatests = []ftoaTest { ftoaTest{ -1, 'b', -1, "-4503599627370496p-52" }, } -export func TestFtoa(t *testing.T) { +func TestFtoa(t *testing.T) { if strconv.FloatSize != 32 { panic("floatsize: ", strconv.FloatSize); } diff --git a/src/lib/strconv/itoa.go b/src/lib/strconv/itoa.go index 256289ada9..7409d0836b 100644 --- a/src/lib/strconv/itoa.go +++ b/src/lib/strconv/itoa.go @@ -4,7 +4,7 @@ package strconv -export func Itoa64(i int64) string { +func Itoa64(i int64) string { if i == 0 { return "0" } @@ -31,7 +31,7 @@ export func Itoa64(i int64) string { return string(b[bp:len(b)]) } -export func Itoa(i int) string { +func Itoa(i int) string { return Itoa64(int64(i)); } diff --git a/src/lib/strconv/itoa_test.go b/src/lib/strconv/itoa_test.go index b0e4ed7fa9..e965a1c167 100644 --- a/src/lib/strconv/itoa_test.go +++ b/src/lib/strconv/itoa_test.go @@ -40,7 +40,7 @@ var itoa64tests = []itoa64Test { itoa64Test{ -1<<63, "-9223372036854775808" }, } -export func TestItoa(t *testing.T) { +func TestItoa(t *testing.T) { for i := 0; i < len(itoa64tests); i++ { test := itoa64tests[i]; s := strconv.Itoa64(test.in); diff --git a/src/lib/strconv/quote.go b/src/lib/strconv/quote.go index 9875450528..b11d738175 100644 --- a/src/lib/strconv/quote.go +++ b/src/lib/strconv/quote.go @@ -10,7 +10,7 @@ import ( const lowerhex = "0123456789abcdef" -export func Quote(s string) string { +func Quote(s string) string { t := `"`; for i := 0; i < len(s); i++ { switch { @@ -67,7 +67,7 @@ export func Quote(s string) string { return t; } -export func CanBackquote(s string) bool { +func CanBackquote(s string) bool { for i := 0; i < len(s); i++ { if s[i] < ' ' || s[i] == '`' { return false; diff --git a/src/lib/strconv/quote_test.go b/src/lib/strconv/quote_test.go index ac2c8e7069..8421fcde49 100644 --- a/src/lib/strconv/quote_test.go +++ b/src/lib/strconv/quote_test.go @@ -23,7 +23,7 @@ var quotetests = []quoteTest { quoteTest{ "\x04", `"\x04"` }, } -export func TestQuote(t *testing.T) { +func TestQuote(t *testing.T) { for i := 0; i < len(quotetests); i++ { tt := quotetests[i]; if out := Quote(tt.in); out != tt.out { @@ -78,7 +78,7 @@ var canbackquotetests = []canBackquoteTest { canBackquoteTest{ `☺`, true }, } -export func TestCanBackquote(t *testing.T) { +func TestCanBackquote(t *testing.T) { for i := 0; i < len(canbackquotetests); i++ { tt := canbackquotetests[i]; if out := CanBackquote(tt.in); out != tt.out { |
