Rob Pike
dfff1829d4
update tutorial for new slicing rules.
...
R=rsc
DELTA=13 (6 added, 0 deleted, 7 changed)
OCL=27539
CL=27541
2009-04-15 20:53:07 -07:00
Rob Pike
b340879ce3
tweak grammar and associated prose to permit things like x.y in range clauses.
...
R=rsc
DELTA=5 (3 added, 0 deleted, 2 changed)
OCL=27536
CL=27540
2009-04-15 20:51:17 -07:00
Rob Pike
7aee71bd4f
spec for range on strings
...
R=rsc,iant
DELTA=17 (11 added, 0 deleted, 6 changed)
OCL=27529
CL=27535
2009-04-15 20:28:25 -07:00
Russ Cox
60ce95d7a1
code changes for array conversion.
...
as a reminder, the old conversion
was that you could write
var arr [10]byte;
var slice []byte;
slice = arr;
but now you have to write
slice = &arr;
the change eliminates an implicit &, so that
the only implicit &s left are in the . operator
and in string(arr).
also, removed utf8.EncodeRuneToString
in favor of string(rune).
R=r
DELTA=83 (1 added, 23 deleted, 59 changed)
OCL=27531
CL=27534
2009-04-15 20:27:45 -07:00
Russ Cox
65d397f747
compiler implementation of array slice change
...
R=ken
OCL=27533
CL=27533
2009-04-15 20:27:22 -07:00
Russ Cox
37a5374c81
document and partially fix a race
...
R=r
DELTA=24 (21 added, 0 deleted, 3 changed)
OCL=27527
CL=27527
2009-04-15 19:01:48 -07:00
Russ Cox
1605176e25
godoc: use data-driven templates for html, text generation
...
R=gri
DELTA=1341 (668 added, 282 deleted, 391 changed)
OCL=27485
CL=27526
2009-04-15 18:53:43 -07:00
Russ Cox
bafd1787fe
fix traceback prints - %S was not advancing pointer enough
...
R=r
DELTA=6 (5 added, 1 deleted, 0 changed)
OCL=27500
CL=27525
2009-04-15 18:52:28 -07:00
Russ Cox
cff99ba167
make Location translate relative path to absolute
...
(HTTP requires absolute in protocol).
add URL tests
R=r
DELTA=243 (242 added, 0 deleted, 1 changed)
OCL=27472
CL=27523
2009-04-15 18:40:55 -07:00
Russ Cox
17c290ffb9
tweak flag comment
...
R=r
DELTA=36 (1 added, 0 deleted, 35 changed)
OCL=27484
CL=27522
2009-04-15 18:39:35 -07:00
Russ Cox
457b0030f7
godoc: supporting data
...
R=gri
DELTA=252 (240 added, 3 deleted, 9 changed)
OCL=27482
CL=27521
2009-04-15 18:38:37 -07:00
Russ Cox
64627b04fb
check for type equality in deepequal
...
R=r,dnadasi
DELTA=9 (8 added, 0 deleted, 1 changed)
OCL=27473
CL=27486
2009-04-15 00:55:58 -07:00
Russ Cox
19692beee8
treat "" as empty
...
R=r
DELTA=10 (10 added, 0 deleted, 0 changed)
OCL=27479
CL=27481
2009-04-15 00:26:49 -07:00
Russ Cox
816f5b3124
better html support.
...
turn on error reporting; not enough info otherwise.
R=r
DELTA=49 (43 added, 6 deleted, 0 changed)
OCL=27476
CL=27478
2009-04-15 00:05:47 -07:00
Rob Pike
1cb1251436
configurable delimiters.
...
R=rsc
DELTA=139 (90 added, 7 deleted, 42 changed)
OCL=27475
CL=27477
2009-04-14 22:35:18 -07:00
Russ Cox
cf8b9ce580
test & fix template used twice
...
R=r
DELTA=30 (30 added, 0 deleted, 0 changed)
OCL=27470
CL=27474
2009-04-14 21:25:33 -07:00
Russ Cox
fa60226073
http additions
...
file system server
add NotFound, Redirect functions
method on a string
R=r
DELTA=212 (199 added, 4 deleted, 9 changed)
OCL=27467
CL=27471
2009-04-14 20:31:31 -07:00
Rob Pike
c956e90913
add a section about order of evaluation
...
DELTA=32 (29 added, 2 deleted, 1 changed)
OCL=27197
CL=27469
2009-04-14 20:10:49 -07:00
Russ Cox
935953a9f8
tweak interface warning heuristic.
...
some day i will fix this for real.
R=ken
OCL=27468
CL=27468
2009-04-14 19:57:27 -07:00
Russ Cox
4b8c13dc20
do not create interfaces containing interfaces
...
R=r
DELTA=16 (14 added, 0 deleted, 2 changed)
OCL=27464
CL=27466
2009-04-14 19:03:57 -07:00
Russ Cox
ff73221d6f
fix infinite loop in Readdirnames: bufp > nbuf can happen
...
after EOF has been hit, because nbuf is now 0 or -1.
discard old comment.
R=r
DELTA=3 (0 added, 0 deleted, 3 changed)
OCL=27463
CL=27465
2009-04-14 18:52:39 -07:00
Ian Lance Taylor
ca9765d83a
Make the reflection library match the reflection string which
...
6g generates for functions: expect the keyword "func". The
older reflection syntax, without the "func", is still
recognized for simplicity in parsing interface reflection
strings.
R=r,rsc
DELTA=66 (31 added, 8 deleted, 27 changed)
OCL=27396
CL=27422
2009-04-14 06:46:01 -07:00
Russ Cox
e21d981a2f
add type in not-found error messages.
...
delay indirection so that values passed to
formatters preserve pointer-ness.
R=r
OCL=27410
CL=27414
2009-04-14 01:12:20 -07:00
Rob Pike
ff12f2effd
add (stub) parser to template code, enabling rewrite.
...
update pretty to use it.
change stdout to stderr in pretty.
R=rsc
DELTA=173 (52 added, 24 deleted, 97 changed)
OCL=27405
CL=27409
2009-04-14 00:06:49 -07:00
Rob Pike
c1ed7d7d25
enable test and fix bug in white space before {
...
R=rsc
DELTA=6 (0 added, 0 deleted, 6 changed)
OCL=27404
CL=27404
2009-04-13 20:37:24 -07:00
Russ Cox
fa7be65bc0
template bug
...
--- FAIL: template.TestAll
for "{.section data}{.end} {header}\n": expected " 77\n" got " {header}\n"
R=r
DELTA=20 (14 added, 0 deleted, 6 changed)
OCL=27395
CL=27402
2009-04-13 19:29:38 -07:00
Russ Cox
6d617a881a
change template function interface to
...
func(w io.Write, value interface{}, format string)
R=r
DELTA=16 (3 added, 3 deleted, 10 changed)
OCL=27399
CL=27401
2009-04-13 19:29:23 -07:00
Rob Pike
a20a50b0b2
\r is white space
...
R=rsc
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=27397
CL=27400
2009-04-13 19:27:35 -07:00
Russ Cox
9b3f43774a
fix error return in Remove
...
change canexec to canExec.
R=r
DELTA=7 (0 added, 0 deleted, 7 changed)
OCL=27393
CL=27398
2009-04-13 19:14:09 -07:00
Russ Cox
5eae3b2102
lib misc
...
* exec.LookPath
* flag.Args
* os.Remove
* strings.HasPrefix
* strings.HasSuffix
* syscall.Rmdir
TBR=r
DELTA=100 (100 added, 0 deleted, 0 changed)
OCL=27373
CL=27392
2009-04-13 16:50:42 -07:00
Russ Cox
3d0e4741eb
godoc: switch to go library template system
...
R=gri
DELTA=272 (38 added, 139 deleted, 95 changed)
OCL=27372
CL=27390
2009-04-13 15:25:50 -07:00
Russ Cox
4011733d3c
allow nil user map
...
R=r
DELTA=5 (3 added, 0 deleted, 2 changed)
OCL=27371
CL=27389
2009-04-13 15:23:57 -07:00
Russ Cox
a9996d0f89
runtime nits: variable name and comments
...
R=r
DELTA=10 (0 added, 0 deleted, 10 changed)
OCL=27374
CL=27388
2009-04-13 15:22:36 -07:00
Russ Cox
e97121a187
working checkpoint.
...
add comment describing new web server tree.
make room for command line interface.
use new path package to get rid of doubled slashes.
use new Chdir function to avoid goroot + everything.
implement new /pkg/ tree instead of using regexps.
R=gri
DELTA=267 (103 added, 72 deleted, 92 changed)
OCL=27150
CL=27367
2009-04-13 13:28:53 -07:00
Russ Cox
73aadff8eb
add strconv.Unquote
...
R=r
DELTA=229 (227 added, 0 deleted, 2 changed)
OCL=27200
CL=27366
2009-04-13 13:27:39 -07:00
Russ Cox
a62467af93
fix stringrange test
...
R=ken
OCL=27353
CL=27353
2009-04-13 05:31:44 -07:00
Ken Thompson
907509de4a
tweak
...
R=r
OCL=27344
CL=27344
2009-04-12 22:34:36 -07:00
Rob Pike
54ec719391
fix string range to have full unicode range (up to 10FFFF).
...
add test for string range.
test has minor failure: after loop the index == len(s); should be len(s)-1
in this case. according to spec, vars are left at position at last
iteration.
R=ken,rsc
DELTA=259 (161 added, 96 deleted, 2 changed)
OCL=27343
CL=27343
2009-04-12 17:01:17 -07:00
Rob Pike
9ddeb2105f
change replacement rune to its correct value, fffd
...
R=ken
OCL=27342
CL=27342
2009-04-12 16:13:34 -07:00
Ken Thompson
a91a8042b4
range over strings
...
R=r
OCL=27332
CL=27332
2009-04-10 19:49:31 -07:00
Rob Pike
72d867660d
bug142 is fixed
...
R=rsc
OCL=27331
CL=27331
2009-04-10 17:58:10 -07:00
Kai Backman
35a775d045
Fixed optab to support SWI with long constant (the mode used
...
for linux system calls).
R=rsc
APPROVED=rsc
DELTA=3 (3 added, 0 deleted, 0 changed)
OCL=27325
CL=27328
2009-04-10 16:44:01 -07:00
Kai Backman
4e1896a1b5
Adding ARM elf support to the 5l linker.
...
R=rsc
APPROVED=rsc
DELTA=312 (312 added, 0 deleted, 0 changed)
OCL=27133
CL=27326
2009-04-10 16:35:36 -07:00
Ken Thompson
cb15bbe748
bug in stack size used in
...
extending segmented stack
R=r
OCL=27319
CL=27319
2009-04-10 15:23:19 -07:00
Russ Cox
78edbfdcf4
test for new string bug
...
TBR=r
OCL=27306
CL=27306
2009-04-10 06:22:41 -07:00
Rob Pike
870c91aec2
fix typo breaking linux build
...
R=rsc
OCL=27304
CL=27304
2009-04-10 02:50:22 -07:00
Ken Thompson
f9854978e2
bug 142
...
order of evaluation && and ||
R=r
OCL=27294
CL=27294
2009-04-09 19:11:24 -07:00
Ken Thompson
3657061550
change representation of strings
...
R=r
OCL=27293
CL=27293
2009-04-09 18:16:21 -07:00
Rob Pike
9192dd8e86
Start list of default formatters for template variables.
...
The HTML one here is just a stub - should use an HTML library to do the right thing.
R=rsc
DELTA=54 (47 added, 2 deleted, 5 changed)
OCL=27250
CL=27250
2009-04-09 00:10:46 -07:00
Rob Pike
4482801477
move template into its own directory so it can have more files
...
R=rsc
DELTA=1421 (736 added, 685 deleted, 0 changed)
OCL=27249
CL=27249
2009-04-08 23:43:02 -07:00