David Symonds
5cb6843a4e
Change exvar to use a goroutine channel worker instead of a mutex for synchronisation.
...
Also it should be more testable, as there's less global state.
R=r
APPROVED=r
DELTA=113 (38 added, 12 deleted, 63 changed)
OCL=27653
CL=27694
2009-04-21 16:50:09 -07:00
David Symonds
3cc702ba60
Initial cut at an "exported variables" (exvar) package.
...
This handles integer-valued vars in a singleton struct, and exports functions
for incrementing, setting and getting those vars, as well as rendering all the
vars in a standard format.
Demonstrate the use of the exvar package in the http/triv server.
R=dcross,r
APPROVED=r
DELTA=122 (122 added, 0 deleted, 0 changed)
OCL=27617
CL=27622
2009-04-19 21:17:27 -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
Russ Cox
f95da9a639
yet another attempt at auto-linking
...
store only the original import path string (+ .a)
if 6g resolves it to an archive file.
let 6l re-resolve the .a at link time.
this lets libraries build against an archive
in the current directory but get used
against an installed archive.
R=r
OCL=27244
CL=27244
2009-04-08 22:45:33 -07:00
Rob Pike
df0b471533
First cut at templating library for text generation
...
R=rsc
DELTA=663 (663 added, 0 deleted, 0 changed)
OCL=27239
CL=27241
2009-04-08 22:08:55 -07:00
Russ Cox
16b38b554f
add path.Clean and other utilities.
...
use path.Clean in web server to sanitize URLs.
http://triv/go/../../../etc/passwd
no longer serves the password file.
it redirects to
http://triv/etc/passwd
which then gets a 404.
R=r
DELTA=288 (286 added, 0 deleted, 2 changed)
OCL=27142
CL=27152
2009-04-07 00:40:07 -07:00
Robert Griesemer
07513c2599
1) Move parser.go into src/lib/go
...
- minor adjustments as suggested by rsc
2) Added parser_test fragment
3) Renamed some types in AST.go per rsc request
R=rsc
DELTA=2053 (2027 added, 0 deleted, 26 changed)
OCL=26963
CL=26971
2009-03-31 16:53:37 -07:00
Ian Lance Taylor
a52d6fb73a
Add a few tests which weren't being run.
...
R=r
DELTA=4 (4 added, 0 deleted, 0 changed)
OCL=26797
CL=26814
2009-03-26 22:20:27 -07:00
Robert Griesemer
dc5ddd7d84
- directory rename lang -> go
...
R=rsc
DELTA=2070 (1035 added, 1035 deleted, 0 changed)
OCL=25939
CL=25939
2009-03-09 12:41:53 -07:00
Rob Pike
99d00eae3c
delete vestigial references to package syscall
...
R=rsc
DELTA=8 (0 added, 5 deleted, 3 changed)
OCL=25857
CL=25861
2009-03-06 16:03:59 -08:00
Rob Pike
5b814d02f2
delete deprecated files.
...
deletion beats documentation for deprecation.
R=rsc,gri
DELTA=509 (2 added, 490 deleted, 17 changed)
OCL=25737
CL=25768
2009-03-05 13:31:03 -08:00
Rob Pike
0ea27e345e
flag: document
...
also write to stderr not stdout
R=rsc
DELTA=48 (38 added, 2 deleted, 8 changed)
OCL=25729
CL=25733
2009-03-04 22:43:51 -08:00
Robert Griesemer
b4802dd568
Created new directory lib/lang:
...
- move scanner to into lib/lang
- added test
- adjusted various make and build files
R=r
DELTA=1731 (973 added, 753 deleted, 5 changed)
OCL=25668
CL=25713
2009-03-04 17:13:12 -08:00
Russ Cox
78906c3836
io.Pipe
...
assorted underscore cleanup
R=r
DELTA=488 (410 added, 3 deleted, 75 changed)
OCL=25070
CL=25070
2009-02-16 16:32:30 -08:00
Russ Cox
ff3173849e
assorted changes:
...
- use a lock instead of a thread in once
avoids deadlock in recursive once calls
- implement os.Setenv
- remove "export" from some scripts
- remove _ from names in time package
- fix time test for non-MTV machines
R=r
DELTA=265 (87 added, 58 deleted, 120 changed)
OCL=25057
CL=25057
2009-02-15 22:12:35 -08:00
Russ Cox
91ceda5c18
add os.ForkExec, os.Exec, os.Wait, exec.OpenCmd.
...
as thread-safe as possible, given the surrounding system.
add stub RWLock implementation.
R=r
DELTA=852 (834 added, 6 deleted, 12 changed)
OCL=25046
CL=25053
2009-02-15 19:35:52 -08:00
Robert Griesemer
070738c30c
- added Makefile change again (lost due to to p4 misuse)
...
R=rsc
OCL=25026
CL=25026
2009-02-13 15:10:35 -08:00
Russ Cox
20b6de135b
fix build
...
TBR=r
OCL=25021
CL=25021
2009-02-13 14:35:36 -08:00
Russ Cox
65ad3ce179
make time fields public
...
R=r
DELTA=49 (0 added, 0 deleted, 49 changed)
OCL=23480
CL=23487
2009-01-26 11:22:21 -08:00
Rob Pike
806d00fc63
add start to a logging package.
...
R=rsc
DELTA=205 (205 added, 0 deleted, 0 changed)
OCL=23448
CL=23478
2009-01-26 09:28:07 -08:00
Russ Cox
1f8a40d85c
move math routines from package sys to package math,
...
though they still build in src/runtime.
use cgo instead of hand-written wrappers.
R=r
DELTA=740 (289 added, 300 deleted, 151 changed)
OCL=23326
CL=23331
2009-01-22 16:23:44 -08:00
Russ Cox
5ea8ac78a8
add unicode library stub with just
...
IsUpper and IsLetter.
R=r
DELTA=746 (746 added, 0 deleted, 0 changed)
OCL=22743
CL=22750
2009-01-14 14:05:00 -08:00
Rob Pike
9ccf39bd68
update to new regime.
...
lines marked BUG are rewrites working around 6g bug.
R=rsc
DELTA=161 (42 added, 2 deleted, 117 changed)
OCL=21689
CL=21689
2008-12-20 17:25:43 -08:00
Russ Cox
d47d888ba6
convert *[] to [].
...
R=r
OCL=21563
CL=21571
2008-12-18 22:37:22 -08:00
Russ Cox
e29ce175ed
malloc in runtime (not used by default)
...
R=r
DELTA=1551 (1550 added, 0 deleted, 1 changed)
OCL=21404
CL=21538
2008-12-18 15:42:28 -08:00
Russ Cox
8fb837d96d
add test for once
...
R=r
DELTA=31 (31 added, 0 deleted, 0 changed)
OCL=21043
CL=21175
2008-12-15 08:56:17 -08:00
Russ Cox
793a6effcf
add JSON library
...
R=r
DELTA=1127 (1127 added, 0 deleted, 0 changed)
OCL=20975
CL=20983
2008-12-11 12:25:58 -08:00
Russ Cox
a9e890d5cf
looks like i broke the build
...
TBR=r
OCL=20963
CL=20963
2008-12-10 21:20:48 -08:00
Rob Pike
73120ee81d
use sync.Mutex instead of a channel for locking
...
R=rsc
DELTA=12 (3 added, 1 deleted, 8 changed)
OCL=20631
CL=20634
2008-12-05 15:18:07 -08:00
Russ Cox
0d1cbaf225
strings.utflen -> utf8.RuneCount, RuneCountInString
...
R=r
DELTA=94 (52 added, 33 deleted, 9 changed)
OCL=20547
CL=20552
2008-12-04 21:00:34 -08:00
Ian Lance Taylor
1a19cb8ec0
Make run.bash run all the current tests.
...
R=r,rsc
DELTA=8 (8 added, 0 deleted, 0 changed)
OCL=20468
CL=20473
2008-12-04 13:14:09 -08:00
Russ Cox
bf3dd3f0ef
add mutex.Mutex
...
R=r
DELTA=349 (348 added, 0 deleted, 1 changed)
OCL=20380
CL=20472
2008-12-04 12:51:36 -08:00
Robert Griesemer
480b962df5
- delete vector.go - not needed anymore
...
- runs all.bash
R=r
DELTA=121 (0 added, 121 deleted, 0 changed)
OCL=19960
CL=19983
2008-11-25 10:08:49 -08:00
Rob Pike
5f9254c11a
make a (rudimentary) ByteBuffer and put it in package "io".
...
fix up protocol buffers to use it.
R=rsc
DELTA=1232 (612 added, 572 deleted, 48 changed)
OCL=19964
CL=19981
2008-11-25 09:41:58 -08:00
Russ Cox
bbe9bb65c7
add hash to build; rm pkg/* in clean.bash
...
R=r
DELTA=3 (3 added, 0 deleted, 0 changed)
OCL=19935
CL=19937
2008-11-24 15:18:29 -08:00
Russ Cox
0a20746cac
remove old .6 after install,
...
so that compilation of other .6
will use the copy in goroot/pkg
R=r
DELTA=3 (1 added, 0 deleted, 2 changed)
OCL=19931
CL=19933
2008-11-24 14:51:01 -08:00
Russ Cox
5169bb44e6
utf8 routines in go; a start.
...
also:
* parse flags in testing.Main.
* add make test in src/lib.
R=r
DELTA=323 (323 added, 0 deleted, 0 changed)
OCL=19831
CL=19850
2008-11-21 16:13:31 -08:00
Russ Cox
c4bba4b1fd
fix build - missed update that added tabwriter
...
TBR=r
OCL=19804
CL=19804
2008-11-21 13:05:09 -08:00
Russ Cox
5a863a4ece
convert lib to a Makefile,
...
mainly for "make bufio.install".
R=r
DELTA=144 (80 added, 62 deleted, 2 changed)
OCL=19760
CL=19799
2008-11-21 12:36:16 -08:00