1
0
mirror of https://github.com/golang/go synced 2024-11-05 11:36:10 -07:00
Commit Graph

12 Commits

Author SHA1 Message Date
Robert Griesemer
5dca7d8bd1 go.tools/go/types: LookupFieldOrMethod checks method set
LookupFieldOrMethod now also decides whether a found
method is actually in the method set. Simplifies call
sites. Added corresponding API tests.

TODO (separate CL): Decide what the correct value for
the indirect result should be (as required for code
generation). For now, the result value for indirect
is unchanged from before if a field/method is found.

Fixes golang/go#8584.

LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/132260043
2014-08-28 13:03:13 -07:00
Alan Donovan
4abc8436bc cmd/eg: add -beforeedit flag, which specifies a command to run before editing a file.
e.g. chmod +w, checkout.

Also: add a TIPS section to the documentation.

LGTM=crawshaw
R=crawshaw, gri
CC=golang-codereviews
https://golang.org/cl/136780044
2014-08-26 15:52:40 -04:00
Paul Nasrat
89156360f9 go.tools/refactor/eg: Support promoted fields and methods.
As per http://golang.org/ref/spec#Struct_types enable eg tool
to wildcard match against promoted fields and methods.

LGTM=adonovan
R=adonovan, gordon.klaus
CC=golang-codereviews
https://golang.org/cl/129260043
2014-08-25 16:26:54 -04:00
Alan Donovan
f2db24a319 go.tools/go/loader: use new types.TypeAndValue mode predicates.
PackageInfo:
- deleted IsType
- inlined + deleted: ValueOf, TypeCaseVar, ImportSpecPkg
- on failure, TypeOf accessor now returns nil (was: panic)

go/ssa: avoid extra map lookups by using Uses or Defs directly when safe to do so,
and keeping the TypeAndValue around in expr0().

LGTM=gri
R=gri, pcc
CC=golang-codereviews
https://golang.org/cl/107650043
2014-07-11 10:50:09 +01:00
Alan Donovan
d014be43ae go.tools/go/types: remove PackageObj Selection - not needed
LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/105920043
2014-06-12 18:05:33 -04:00
Rob Pike
a8c8f48be3 go.tools/all: the the thes are too frequent, it's clear that that's not what we want
LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/98380043
2014-05-19 09:48:30 -07:00
Robert Griesemer
30b1abe2f7 go.tools: fix various typos
LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/97920045
2014-05-02 14:38:08 -07:00
Alan Donovan
8eccac8f9a go.tools/refactor/eg: avoid nonstandard 'diff -N' option.
(To fix broken Solaris test)

LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/90080044
2014-04-21 18:35:16 -04:00
Alan Donovan
066bab1496 go.tools/refactor/eg: move misplaced comment
LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/88100046
2014-04-16 16:50:19 -04:00
Alan Donovan
ccb0e9ab88 go.tools/.hgignore: don't ignore test-generated files, clean them up.
(Includes rollback of CL 83680043.)

LGTM=gri
R=gri
CC=golang-codereviews, rsc
https://golang.org/cl/86430045
2014-04-10 13:17:20 -04:00
Alan Donovan
14aef25050 go.tools/refactor/eg: remove debugging code accidentally committed.
LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/83650043
2014-04-02 12:39:10 -04:00
Alan Donovan
bfcffc697d go.tools/refactor/eg: an example-based refactoring tool.
See refactor/eg/eg.go for details.

LGTM=crawshaw
R=crawshaw, gri, kamil.kisiel, josharian
CC=golang-codereviews
https://golang.org/cl/81010043
2014-04-02 12:24:55 -04:00