1
0
mirror of https://github.com/golang/go synced 2024-10-04 05:21:22 -06:00
Commit Graph

56 Commits

Author SHA1 Message Date
Rob Pike
989e611a7b unicode: various documentation tweaks
The comment on IsOneOf regarding Latin-1 was an implementation detail:
when the function is called internally, that condition is true. It used to matter,
but now the comment is a dreg. The function works fine if the character is
Latin-1, so we just delete the comment.

Fixes #2966.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5655047
2012-02-10 14:30:44 +11:00
David Symonds
ebd9f236de unicode: document large var blocks and the SpecialCase vars.
Fixes #2772.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5631047
2012-02-04 18:35:37 +11:00
Nigel Tao
102638cb53 std: add struct field tags to untagged literals.
R=rsc, dsymonds, bsiegert, rogpeppe
CC=golang-dev
https://golang.org/cl/5619052
2012-02-03 10:12:25 +11:00
Russ Cox
2666b815a3 use new strconv API
All but 3 cases (in gcimporter.go and hixie.go)
are automatic conversions using gofix.

No attempt is made to use the new Append functions
even though there are definitely opportunities.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5447069
2011-12-05 15:48:46 -05:00
Rob Pike
45e3bcb343 renaming_3: gofix -r go1pkgrename src/pkg/[m-z]*
R=rsc
CC=golang-dev
https://golang.org/cl/5345045
2011-11-08 15:41:54 -08:00
Russ Cox
965845a86d all: sort imports
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5319072
2011-11-02 15:54:16 -04:00
Russ Cox
eb6929299b src/pkg/[n-z]*: gofix -r error -force=error
R=golang-dev, bsiegert, iant
CC=golang-dev
https://golang.org/cl/5294074
2011-11-01 22:05:34 -04:00
Russ Cox
7630a107bb unicode, utf8, utf16: use rune
Everything changes.

R=r
CC=golang-dev
https://golang.org/cl/5310045
2011-10-25 22:23:15 -07:00
Russ Cox
b4d6b71e16 unicode: sort tables.go
Makes tables.go output consistent across maketable runs.
(It was already inconsistent across architectures; the new
map iteration order just make it inconsistent across runs.)

R=r
CC=golang-dev
https://golang.org/cl/5303046
2011-10-19 16:02:22 -04:00
Russ Cox
313c8224d5 gofix -r mapdelete
R=golang-dev, r, adg, r, cw
CC=golang-dev
https://golang.org/cl/5266045
2011-10-18 09:56:34 -04:00
Russ Cox
92703ff605 unicode: fix make tables
R=r
CC=golang-dev
https://golang.org/cl/5131044
2011-09-26 13:10:16 -04:00
Rob Pike
5ea413e2a0 unicode: fix case-mapping for roman numerals!!
Hurray!
Also fix the mystical U+0345 COMBINING GREEK YPOGEGRAMMENI,
so everyone is satisfied.
Also add a -local flag to use local files for faster turnaround
when debugging.

R=rsc
CC=golang-dev
https://golang.org/cl/4825054
2011-07-27 15:54:23 -07:00
Robert Griesemer
90564a9256 go/printer: changed max. number of newlines from 3 to 2
manual changes in src/pkg/go/printer, src/cmd/gofix/signal_test.go
(cd src/cmd/gofix/testdata; gofmt -w *.in *.out)
(cd src/pkg/go/printer; gotest -update)
gofmt -w misc src

runs all tests

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4715041
2011-07-14 14:39:40 -07:00
Andrew Gerrand
5bcbcab311 sort: rename helpers: s/Sort// in sort.Sort[Float64s|Ints|Strings]
Includes 'sorthelpers' gofix and updates to tree.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/4631098
2011-07-08 10:52:50 +10:00
Rob Pike
a8e5db9449 maketables: update debugging data.
This is unused in the generation of the tables, but was incorrect if we ever needed it.
Also update the reference to the document.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4626097
2011-07-06 15:35:23 +10:00
Rob Pike
ebb1566a46 strings.Split: make the default to split all.
Change the signature of Split to have no count,
assuming a full split, and rename the existing
Split with a count to SplitN.
Do the same to package bytes.
Add a gofix module.

R=adg, dsymonds, alex.brainman, rsc
CC=golang-dev
https://golang.org/cl/4661051
2011-06-28 09:43:14 +10:00
Russ Cox
fc77e82617 unicode: add case folding tables
R=r, r
CC=golang-dev
https://golang.org/cl/4571074
2011-06-16 17:56:25 -04:00
Rob Pike
4b1170d2b1 sort: change IntArray etc. to IntSlice for better name hygiene.
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/4602054
2011-06-11 09:25:18 +10:00
Rob Pike
7a92287a48 unicode: for consistency with MaxRune, s/Latin1Max/MaxLatin1/ and
s/ASCIIMax/MaxASCII/

R=golang-dev, r, gri
CC=golang-dev
https://golang.org/cl/4539109
2011-06-04 09:28:27 +10:00
Rob Pike
8d64e73f94 unicode: add the first few property tests for printing.
The long-term goal is that %q will use IsPrint to decide
what to show natively vs. as hexadecimal.

R=rsc, r
CC=golang-dev
https://golang.org/cl/4526095
2011-06-04 07:46:22 +10:00
Rob Pike
9ec0c01e19 unicode: guarantee that the 32-bit range tables contain only
values >= 16 bits, so the lookup code can be smaller in the
common case.
Also make CaseRange uint32s rather than ints, so if we go to
64-bit ints we don't waste more space.

R=rsc
CC=golang-dev
https://golang.org/cl/4550094
2011-06-01 09:49:51 +10:00
Rob Pike
0de328edd6 unicode: make the tables smaller.
By splitting the ranges into 16-bit values and 32-bit values,
we can reduce about 3000 entries by 48 bits per entry, or about
16KB, at the cost of a little more complexity in the code.

R=iant, bradfitz, rsc, r
CC=golang-dev
https://golang.org/cl/4547066
2011-05-31 09:58:07 +10:00
Brad Fitzpatrick
b2400c28cf fix windows build: http.Get finalURL removal missed earlier
Not sure why this only broke Windows. Make test is only run
on windows for that directory?

TBR=golang-dev

R=golang-dev
CC=golang-dev
https://golang.org/cl/4545044
2011-05-13 18:56:39 -07:00
Rob Pike
eea18d959e log: rename Exit* to Fatal*
This aligns the naming scheme with the testing package and
also lets govet work on more logging calls.

R=rsc
CC=golang-dev
https://golang.org/cl/4001048
2011-02-01 12:47:35 -08:00
Rob Pike
fc52d7029f unicode: update to unicode 6.0.0
R=rsc
CC=golang-dev
https://golang.org/cl/3981049
2011-01-31 15:20:44 -08:00
Russ Cox
0f0f34ee05 unicode: add maketables to build, fix build
R=r
CC=golang-dev
https://golang.org/cl/4073046
2011-01-30 16:09:16 -05:00
Ryan Hitchman
062406bc64 throughout: simplify two-variable ranges with unused second variable
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/3529041
2010-12-08 21:36:56 -08:00
Rob Pike
1ce6245d6c throughout: fix broken calls to Printf etc.
I have written a tool to verify Printf calls, and although it's not
ready to be reviewed yet it's already uncovered a spate of problems
in the repository.  I'm sending this CL to break the changes into
pieces; as the tool improves it will find more, I'm sure.

R=rsc
CC=golang-dev
https://golang.org/cl/3427043
2010-12-07 16:42:54 -05:00
Rob Pike
42cfe48ffc use the new %U format for runes
R=rsc
CC=golang-dev
https://golang.org/cl/3483041
2010-12-06 14:38:25 -05:00
Russ Cox
69c4e9380b use append
R=gri, r, r2
CC=golang-dev
https://golang.org/cl/2743042
2010-10-27 19:47:23 -07:00
Russ Cox
d86ab015f7 use copy
R=gri
CC=golang-dev
https://golang.org/cl/2763041
2010-10-26 21:52:54 -07:00
Rob Pike
38f1231f3e strings and bytes.Split: make count of 0 mean 0, not infinite.
Use a count of -1 for infinity.  Ditto for Replace.

R=rsc
CC=golang-dev
https://golang.org/cl/1704044
2010-07-01 14:08:14 -07:00
Robert Griesemer
45ca9f7a9e 1) Change default gofmt default settings for
parsing and printing to new syntax.

   Use -oldparser to parse the old syntax,
   use -oldprinter to print the old syntax.

2) Change default gofmt formatting settings
   to use tabs for indentation only and to use
   spaces for alignment. This will make the code
   alignment insensitive to an editor's tabwidth.

   Use -spaces=false to use tabs for alignment.

3) Manually changed src/exp/parser/parser_test.go
   so that it doesn't try to parse the parser's
   source files using the old syntax (they have
   new syntax now).

4) gofmt -w src misc test/bench

5th and last set of files.

R=rsc
CC=golang-dev
https://golang.org/cl/180050
2009-12-15 15:41:46 -08:00
Robert Griesemer
295ceb4526 remove uses of string concatenation from src and misc directory
R=rsc
https://golang.org/cl/172041
2009-12-09 16:54:07 -08:00
Rob Pike
ceb1fe2863 update package unicode to Unicode 5.2
R=rsc
CC=golang-dev
https://golang.org/cl/163062
2009-12-01 16:22:21 -08:00
Russ Cox
9ac4449cb2 gofmt -r 'α[β:len(α)] -> α[β:]' -w src/cmd src/pkg
R=r, gri
CC=golang-dev
https://golang.org/cl/156115
2009-11-20 11:45:05 -08:00
Robert Griesemer
3bb0032cd6 - replaced gofmt expression formatting algorithm with
rsc's algorithm
- applied gofmt -w misc src
- partial CL (last chunk)

R=rsc, r
http://go/go-review/1024041
2009-11-09 21:23:52 -08:00
Robert Griesemer
40621d5c0d remove semis after statements in one-statement statement lists
R=rsc, r
http://go/go-review/1025029
2009-11-09 12:07:39 -08:00
Russ Cox
ed6eb5b577 a nagging inconsistency: capitalization of
HTML vs Html, URL vs Url, HTTP vs Http,
current source is 6:1 in favor of the former,
so change instances of the latter.

R=r
CC=go-dev
http://go/go-review/1024026
2009-11-08 21:46:20 -08:00
Robert Griesemer
45cba57e89 gofmt'ed more stragglers
R=rsc
http://go/go-review/1019004
2009-11-05 18:26:16 -08:00
Robert Griesemer
841c18a95a gofmt-ify unicode
R=r
http://go/go-review/1018051
2009-11-04 21:39:55 -08:00
Rob Pike
a82465103f use the new routine regexp.MustCompile to clean up some code that uses global regexps.
R=rsc, gri
CC=go-dev
http://go/go-review/1016025
2009-11-02 11:37:52 -08:00
Rob Pike
d80a177a9e make ToUpper, ToLower etc. handle unicode properly.
Change their names too.

R=rsc
DELTA=206  (123 added, 2 deleted, 81 changed)
OCL=34170
CL=34194
2009-09-01 11:06:28 -07:00
Rob Pike
fe3838489f submitter's regret. rename Props to Properties
R=rsc
DELTA=9  (0 added, 0 deleted, 9 changed)
OCL=34148
CL=34151
2009-08-31 16:48:56 -07:00
Rob Pike
1e55e4a3e6 add property tables
R=rsc
DELTA=1087  (1001 added, 78 deleted, 8 changed)
OCL=34137
CL=34147
2009-08-31 16:43:17 -07:00
Rob Pike
427a0adb39 further simplification of the case fold calculation.
hard to beat at this point, i think.

R=rsc
DELTA=38  (8 added, 21 deleted, 9 changed)
OCL=34092
CL=34096
2009-08-30 18:17:52 -07:00
Rob Pike
3c098e2789 add the Upper/Lower sequence optimization.
tables shrink 900 lines.
mapping code gets a little slower

R=rsc
DELTA=1124  (105 added, 952 deleted, 67 changed)
OCL=34079
CL=34089
2009-08-30 14:02:42 -07:00
Rob Pike
22c2b476a8 first cut at case mapping tables and library.
next cut will do the optimization for alternating sequences.

R=rsc
DELTA=1658  (1620 added, 9 deleted, 29 changed)
OCL=34072
CL=34075
2009-08-28 23:05:16 -07:00
Rob Pike
f59ae064ba fix ", First" ", Last" ranges from UnicodeData.txt
R=rsc
DELTA=54  (38 added, 2 deleted, 14 changed)
OCL=34032
CL=34040
2009-08-28 11:57:38 -07:00
Rob Pike
25caf18a8e improve generated code for godocability
R=rsc
DELTA=459  (168 added, 279 deleted, 12 changed)
OCL=34005
CL=34007
2009-08-27 18:38:02 -07:00