go/src/pkg
Robert Griesemer d08dd8bec1 go/scanner: clean up error interface
Issue 2856 asks for a rename of a few methods to a
more idiomatic Go style. This is a very early API
that evolved organically throughout the years.
Together with the fact that ErrorVectors were embedded
in other data structures (e.g. Parser), just renaming
methods (e.g. GetError -> Error) would lead to undesired
behavior (e.g., Parser would act like an Error). Instead,
cleaned up API a bit more:

- removed ErrorVector in favor of ErrorList (already
present)
- simplified Scanner.Init by making the error handler a
function instead of requiring an ErrorHandler implementation
- adjusted helper functions accordingly
- updated Go 1 doc

Fixes #2856.

R=rsc
CC=golang-dev
https://golang.org/cl/5624047
2012-02-08 11:41:32 -08:00
..
archive archive/zip: tweak API and docs. 2012-02-08 14:34:40 +11:00
bufio bufio: drop error return for NewReaderSize and NewWriterSize 2012-02-08 13:07:13 +11:00
builtin builtin: document delete 2011-11-09 10:49:41 -08:00
bytes bytes: API tweaks 2012-02-06 15:29:21 +11:00
compress all: avoid bytes.NewBuffer(nil) 2012-02-06 14:09:00 +11:00
container build: remove Make.pkg, Make.tool 2012-01-30 23:43:46 -05:00
crypto doc: remove overuse of simply 2012-02-06 13:34:35 -05:00
database/sql database/sql: treat pointers as nullable types like encoding/json 2012-02-08 17:14:15 +11:00
debug build: remove Make.pkg, Make.tool 2012-01-30 23:43:46 -05:00
encoding encoding/json: document buffering 2012-02-08 13:48:03 -05:00
errors build: remove Make.pkg, Make.tool 2012-01-30 23:43:46 -05:00
exp go/scanner: clean up error interface 2012-02-08 11:41:32 -08:00
expvar doc: remove overuse of simply 2012-02-06 13:34:35 -05:00
flag flag: describe valid input for Duration flags. 2012-02-07 17:50:04 +11:00
fmt fmt: diagnose invalid verb applied to pointer 2012-02-07 23:37:05 -05:00
go go/scanner: clean up error interface 2012-02-08 11:41:32 -08:00
hash build: remove Make.pkg, Make.tool 2012-01-30 23:43:46 -05:00
html all: avoid bytes.NewBuffer(nil) 2012-02-06 14:09:00 +11:00
image bufio: drop error return for NewReaderSize and NewWriterSize 2012-02-08 13:07:13 +11:00
index/suffixarray build: remove Make.pkg, Make.tool 2012-01-30 23:43:46 -05:00
io io/ioutil: document EOF behavior in ReadFile and ReadAll 2012-02-08 11:40:56 +11:00
log build: remove Make.pkg, Make.tool 2012-01-30 23:43:46 -05:00
math math/big: more accurate package comment 2012-02-03 10:17:19 -08:00
mime build: remove Make.pkg, Make.tool 2012-01-30 23:43:46 -05:00
net net/http: panic on duplicate registrations 2012-02-08 13:50:00 -05:00
old all: avoid bytes.NewBuffer(nil) 2012-02-06 14:09:00 +11:00
os os: turn FileStat.Sys into a method on FileInfo 2012-02-03 00:16:18 -02:00
path path/filepath: repair and simplify the symlink test 2012-02-07 11:00:13 +11:00
reflect runtime: delete UpdateMemStats, replace with ReadMemStats(&stats). 2012-02-06 19:16:26 +01:00
regexp regexp: fix typo 2012-02-08 08:59:59 -05:00
runtime runtime: drop to 32 bit malloc if 64 bit will not work 2012-02-08 14:39:16 -05:00
sort build: remove Make.pkg, Make.tool 2012-01-30 23:43:46 -05:00
strconv strconv: handle very large inputs 2012-02-07 23:37:15 -05:00
strings strings: add Fields example 2012-02-03 11:17:55 -08:00
sync build: remove Make.pkg, Make.tool 2012-01-30 23:43:46 -05:00
syscall syscall: add Timeval.Nano, Timespec.Nano, for conversion to Duration 2012-02-06 18:04:12 -05:00
testing testing: capture panics, present them, and mark the test as a failure. 2012-02-06 14:00:23 +11:00
text doc: remove overuse of simply 2012-02-06 13:34:35 -05:00
time time: clean up MarshalJSON, add RFC3339 method 2012-02-07 23:37:25 -05:00
unicode build: delete make paraphernalia 2012-02-06 13:34:25 -05:00
unsafe unsafe: refer to correct reflect functions 2012-01-04 17:14:56 +11:00
deps.bash renaming_1: hand-edited files for go 1 renaming 2011-11-08 15:38:47 -08:00