Rob Pike
368b42103e
add crypto/hmac to makefile
...
R=rsc
DELTA=4 (3 added, 0 deleted, 1 changed)
OCL=29314
CL=29314
2009-05-23 13:53:36 -07:00
Russ Cox
140aed9ab7
hash reorg.
...
* new package hash defining interfaces Hash and Hash32.
* adler32 and crc32 return Hash32 instead of specific types.
* adler32 and crc32 provide non-allocating methods for single slices.
* sha1 and md5 move to crypto, return Hash.
* sum.go, a simple test program, moves to /usr/rsc.
* refresh Make.deps
R=r
DELTA=1908 (935 added, 923 deleted, 50 changed)
OCL=29095
CL=29135
2009-05-20 18:16:38 -07:00
Russ Cox
02f13e4764
build crypto/block.
...
deps.bash tweak.
R=r
DELTA=95 (95 added, 0 deleted, 0 changed)
OCL=29046
CL=29059
2009-05-19 15:42:00 -07:00
David Symonds
760b778458
Create dependencies automatically for top-level lib directory.
...
It caught a few missing dependencies (bufio/fmt -> utf8, fmt -> os, http -> strconv, etc.).
R=r,rsc
APPROVED=r
DELTA=126 (79 added, 45 deleted, 2 changed)
OCL=28983
CL=29014
2009-05-18 18:42:47 -07:00
Russ Cox
be869ba4d6
add io.ByteReader.
...
add testing/iotest package.
make bufio return error on short write.
R=r
DELTA=423 (208 added, 154 deleted, 61 changed)
OCL=28997
CL=28999
2009-05-18 13:31:56 -07:00
Russ Cox
a854c7f993
AES key setup and block ciphers.
...
AES mode wrappers not implemented, so no public interface yet.
R=r
DELTA=918 (918 added, 0 deleted, 0 changed)
OCL=28848
CL=28863
2009-05-14 17:11:11 -07:00
Russ Cox
d06a79e31b
no need for compiler to hard-code definition of runtime.
...
use the actual go source instead.
R=r
DELTA=90 (66 added, 18 deleted, 6 changed)
OCL=28708
CL=28719
2009-05-12 16:15:52 -07:00
Russ Cox
daf44e2fa5
fix build: proto depends on fmt now
...
TBR=r,dsymonds
OCL=28711
CL=28711
2009-05-12 15:47:55 -07:00
Rob Pike
93bbbf90ef
make go/src/lib/hash one directory per package
...
(slipped through the cracks last time)
R=rsc
DELTA=2436 (1337 added, 1090 deleted, 9 changed)
OCL=28427
CL=28443
2009-05-07 17:15:24 -07:00
Russ Cox
1d1316c885
makefile fixes
...
R=r
OCL=28369
CL=28369
2009-05-06 16:16:55 -07:00
Robert Griesemer
1d6bd79ceb
new dir structure for lib/go
...
R=r
DELTA=9298 (4760 added, 4536 deleted, 2 changed)
OCL=28317
CL=28317
2009-05-05 18:38:45 -07:00
Rob Pike
86043a87c9
mv container/vector down one level for new rules.
...
simplify run.bash now that lib has make test that recurs.
R=rsc
DELTA=1179 (578 added, 596 deleted, 5 changed)
OCL=28313
CL=28313
2009-05-05 17:24:01 -07:00
Rob Pike
9b2c5da922
directory-per-package step 1: move files from lib/X.go to lib/X/X.go
...
no substantive changes except:
- new Makefiles, all auto-generated
- go/src/lib/Makefile has been extensively edited
R=rsc
OCL=28310
CL=28310
2009-05-05 17:05:39 -07:00
David Symonds
2f284948af
Remake exvar package to be more Go-ish.
...
It now exports a Var interface (anyone can export their own custom var types now), so users need to create and manage their own vars and mark them as exportable via the Publish function. They are exposed via /debug/vars.
R=r,rsc
APPROVED=r
DELTA=605 (314 added, 186 deleted, 105 changed)
OCL=28143
CL=28239
2009-05-04 15:14:22 -07:00
Robert Griesemer
4fc82c2e1e
fix for broken build
...
TBR=r
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=27969
CL=27969
2009-04-28 09:56:33 -07:00
David Symonds
1304183efc
Add more dependencies for lib/go.
...
This makes "make nuke install" work again.
R=r
APPROVED=r
DELTA=2 (1 added, 0 deleted, 1 changed)
OCL=27929
CL=27932
2009-04-27 21:52:30 -07:00
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