Sergio Luis O. B. Correia
6fc820729e
go: makes it build for the case $GOROOT has whitespaces
...
the bash scripts and makefiles for building go didn't take into account
the fact $GOROOT / $GOBIN could both be directories containing whitespaces,
and was not possible to build it in such a situation.
this commit adjusts the various makefiles/scripts to make it aware of that
possibility, and now it builds successfully when using a path with whitespaces
as well.
Fixes #115 .
R=rsc, dsymonds1
https://golang.org/cl/157067
2009-11-23 17:32:51 -08:00
Russ Cox
6e0767bb04
reflect fixes
...
R=r
https://golang.org/cl/156104
2009-11-19 22:06:32 -08:00
Russ Cox
1dbd3c8d3d
reflect: document that PkgPath and Name return
...
empty string for unnamed types.
Fixes #249 .
R=r
https://golang.org/cl/156052
2009-11-17 16:03:14 -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
Rob Pike
e02f2b51c5
delete a pointless todo in all_test.go.
...
address one in rpc/client.go
R=rsc
CC=go-dev
http://go/go-review/1026030
2009-11-08 21:57:59 -08:00
Rob Pike
ceb6031ecd
delete TODO now that compiler is better at %
...
adjust an inconsistency in reflect/type.go's package comment
R=rsc
http://go/go-review/1026029
2009-11-08 20:45:39 -08:00
Rob Pike
40a7db3ee9
add top-level package comments for net, reflect, malloc.
...
reflect is a little more detailed than some because it affords an opportunity
to explain how to approach the library.
R=gri, rsc
CC=go-dev
http://go/go-review/1026026
2009-11-08 15:57:25 -08:00
Robert Griesemer
a05a5465c8
- application of gofmt with one-line composite literal structs enabled
...
- this CL is dependent on CL 1025008
R=r, rsc
http://go/go-review/1025009
2009-11-06 16:33:53 -08:00
Robert Griesemer
368f8cbc75
- fine-tuning of one-line func heuristic (nodes.go)
...
- enabled for function declarations (not just function literals)
- applied gofmt -w $GOROOT/src
(look for instance at src/pkg/debug/elf/elf.go)
R=r, rsc
CC=go-dev
http://go/go-review/1026006
2009-11-06 14:24:38 -08:00
Robert Griesemer
7151d2337b
missing piece gofmt'ed in reflect
...
R=r, rsc
http://go/go-review/1025001
2009-11-05 18:27:30 -08:00
Robert Griesemer
77334b988c
gofmt-ify reflect
...
- the single line structs can be fixed in another round
R=rsc
http://go/go-review/1016052
2009-11-05 14:23:20 -08:00
Russ Cox
7732d80ceb
misc cleanup
...
R=r
http://go/go-review/1016017
2009-11-01 09:25:55 -08:00
Adam Langley
a8a678fc2a
Add SetValue(Value) to the Value interface.
...
R=rsc
APPROVED=rsc
DELTA=172 (170 added, 0 deleted, 2 changed)
OCL=35969
CL=35980
2009-10-21 19:51:27 -07:00
Russ Cox
91549438d8
apply gofmt to rand reflect regexp rpc runtime sort strconv strings sync syscall testing time unicode unsafe utf8
...
R=gri
DELTA=1409 (79 added, 24 deleted, 1306 changed)
OCL=35415
CL=35437
2009-10-07 11:55:06 -07:00
Russ Cox
6f1698774d
undo 35108 (disallow parens around type in struct literal).
...
allow parens around [...]int in struct literal.
R=ken
OCL=35112
CL=35130
2009-09-29 21:21:14 -07:00
Russ Cox
9c3c140984
disallow parens around type in struct literal syntax,
...
per discussion with gri.
R=ken
OCL=35108
CL=35108
2009-09-29 16:05:44 -07:00
Russ Cox
20011bc878
unused imports
...
R=r
OCL=34731
CL=34731
2009-09-17 10:27:04 -07:00
Russ Cox
ca6a0fee1b
more "declared and not used".
...
the last round omitted := range and only
checked 1 out of N vars in a multi-var :=
R=r
OCL=34624
CL=34638
2009-09-15 09:41:59 -07:00
Russ Cox
28eba4877b
fix "declared and not used" errors in non-test code.
...
R=r
DELTA=112 (6 added, 57 deleted, 49 changed)
OCL=34610
CL=34610
2009-09-14 17:20:29 -07:00
Russ Cox
33be0c6465
nil in DeepEqual
...
R=r
DELTA=13 (5 added, 6 deleted, 2 changed)
OCL=34337
CL=34343
2009-09-03 15:45:43 -07:00
Ian Lance Taylor
8ce468ea2f
Restore comment line accidentally dropped in CL 33097.
...
R=rsc
DELTA=1 (1 added, 0 deleted, 0 changed)
OCL=33891
CL=33891
2009-08-26 14:40:34 -07:00
Russ Cox
de7920e6fd
finish ChanValue: Len and Cap.
...
R=r
DELTA=45 (45 added, 0 deleted, 0 changed)
OCL=33873
CL=33881
2009-08-26 12:42:22 -07:00
Russ Cox
653cef1ba0
add Close() and Closed() to ChanValue
...
R=r
DELTA=60 (56 added, 3 deleted, 1 changed)
OCL=33868
CL=33872
2009-08-26 10:47:18 -07:00
Russ Cox
92543daff1
change reflect test to avoid bug132
...
R=gri
DELTA=20 (17 added, 0 deleted, 3 changed)
OCL=33793
CL=33802
2009-08-24 17:04:12 -07:00
Robert Griesemer
c36fbdf713
- fix for multiple fields at same depth error
...
R=rsc
DELTA=9 (5 added, 0 deleted, 4 changed)
OCL=33768
CL=33785
2009-08-24 15:45:51 -07:00
Russ Cox
b5c57fea96
delete forward type declarations
...
R=r
DELTA=163 (1 added, 149 deleted, 13 changed)
OCL=33106
CL=33111
2009-08-12 14:40:47 -07:00
Russ Cox
3b864e4195
convert low-level (used by testing) packages to
...
whole-package compilation. new Makefiles,
tests now in separate package
bytes
flag
fmt
io
math
once
os
reflect
strconv
sync
time
utf8
delete import "xxx" in package xxx.
inside package xxx, xxx is not declared
anymore so s/xxx.//g
delete file and package level forward declarations.
note the new internal_test.go and sync
and strconv to provide public access to
internals during testing. the installed version
of the package omits that file and thus does
not open the internals to all clients.
R=r
OCL=33065
CL=33097
2009-08-12 13:18:37 -07:00
Russ Cox
0496040bd6
remove unnecessary pkg. references
...
R=r
DELTA=95 (0 added, 0 deleted, 95 changed)
OCL=33012
CL=33012
2009-08-10 22:02:51 -07:00
Robert Griesemer
a288095813
- FieldByName lookup through anonymous fields
...
- FieldByIndex
- changed StructField.Index type from int -> []int
- adjustments to reflect clients
R=rsc,r
DELTA=336 (263 added, 47 deleted, 26 changed)
OCL=32731
CL=32802
2009-08-05 15:56:44 -07:00
Rob Pike
cb9c973829
don't crash printing a nil map
...
R=rsc
DELTA=19 (18 added, 0 deleted, 1 changed)
OCL=32656
CL=32670
2009-08-03 13:34:20 -07:00
Russ Cox
123ff2ebb8
bug177: anonymous struct fields in reflect
...
(reported by iant)
R=r
DELTA=50 (32 added, 12 deleted, 6 changed)
OCL=32263
CL=32385
2009-07-28 17:01:46 -07:00
Russ Cox
ca01716934
fix build - broke with uint32 -> int change in reflect SliceHeader
...
TBR=r
OCL=32225
CL=32225
2009-07-27 11:23:49 -07:00
Russ Cox
22ea3f9e49
fix SliceHeader: len and cap are int, not uint32
...
R=r,iant
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=32215
CL=32222
2009-07-27 10:59:37 -07:00
Ian Lance Taylor
f0c00f7eee
Don't cast nil to a fixed array type.
...
R=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=31916
CL=31937
2009-07-21 14:06:14 -07:00
Ian Lance Taylor
39808db15a
Make struct field names unique.
...
R=rsc
DELTA=5 (0 added, 0 deleted, 5 changed)
OCL=31900
CL=31900
2009-07-20 23:26:03 -07:00
Rob Pike
ba0cf083a2
change reflect.Type.Name() into two functions: Name() and PkgPath() for ease of use.
...
R=rsc
DELTA=31 (8 added, 2 deleted, 21 changed)
OCL=31778
CL=31792
2009-07-17 14:20:33 -07:00
Rob Pike
a93c5c8550
add FieldByName to the interface of reflect.StructType
...
R=rsc
DELTA=34 (33 added, 0 deleted, 1 changed)
OCL=31752
CL=31754
2009-07-16 18:21:14 -07:00
Rob Pike
b75df2f695
fix some bad testing prints
...
R=rsc
DELTA=5 (0 added, 0 deleted, 5 changed)
OCL=31740
CL=31742
2009-07-16 15:01:21 -07:00
Russ Cox
92e925778e
reflection for interface set
...
rename map access methods to Elem, SetElem.
R=r
DELTA=95 (66 added, 7 deleted, 22 changed)
OCL=31456
CL=31469
2009-07-10 16:32:26 -07:00
Rob Pike
1880b90aff
DeepEqual for maps
...
R=rsc
DELTA=47 (30 added, 16 deleted, 1 changed)
OCL=31455
CL=31455
2009-07-10 11:20:10 -07:00
Russ Cox
12ebbe7463
reflection for methods
...
R=r
DELTA=156 (135 added, 8 deleted, 13 changed)
OCL=31407
CL=31428
2009-07-09 17:27:49 -07:00
Russ Cox
bba278a43b
reflection for functions
...
add channel send type check (thanks austin).
fix type mismatch message.
R=r
DELTA=241 (225 added, 5 deleted, 11 changed)
OCL=31370
CL=31375
2009-07-08 18:16:09 -07:00
Russ Cox
5ddaf9a098
reflection for channels
...
R=r
DELTA=188 (171 added, 6 deleted, 11 changed)
OCL=31352
CL=31361
2009-07-08 15:00:54 -07:00
Russ Cox
764b6ec1aa
reflection for maps
...
R=r
DELTA=304 (248 added, 34 deleted, 22 changed)
OCL=31345
CL=31347
2009-07-08 13:55:57 -07:00
Ian Lance Taylor
dbc6d91d70
typestring.c is no longer needed.
...
R=rsc
DELTA=35 (0 added, 34 deleted, 1 changed)
OCL=31301
CL=31303
2009-07-07 14:50:39 -07:00
Russ Cox
64f4e0b197
update reflect supporting functions,
...
tests to use new reflect interface.
also make tests a real gotest.
depends on CL 31107
R=r
DELTA=582 (56 added, 194 deleted, 332 changed)
OCL=31108
CL=31279
2009-07-07 11:03:12 -07:00
Russ Cox
ce2e450c6b
install new reflect:
...
rename ntype.go and nvalue.go to type.go and value.go
R=r
DELTA=4295 (761 added, 2819 deleted, 715 changed)
OCL=31238
CL=31276
2009-07-07 11:02:44 -07:00
Russ Cox
58c4142e74
new reflect Value implementations.
...
for now, canSet stays.
i will look into getting rid of it in
a future CL.
R=r
DELTA=420 (419 added, 0 deleted, 1 changed)
OCL=31231
CL=31235
2009-07-06 22:10:40 -07:00
Russ Cox
a7b4e9f03e
new reflect type.go implementation
...
R=r
DELTA=179 (172 added, 6 deleted, 1 changed)
OCL=31215
CL=31220
2009-07-06 16:06:31 -07:00