Descriptiongo/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 issue 2856.
Patch Set 1 #Patch Set 2 : diff -r d267ecc8b934 https://code.google.com/p/go #Patch Set 3 : diff -r 389444436d35 https://code.google.com/p/go #Patch Set 4 : diff -r 389444436d35 https://code.google.com/p/go #Patch Set 5 : diff -r 389444436d35 https://code.google.com/p/go #Patch Set 6 : diff -r 389444436d35 https://code.google.com/p/go #
Total comments: 4
Patch Set 7 : diff -r 97736bb869c4 https://code.google.com/p/go #Patch Set 8 : diff -r 34e1fd6b8b79 https://code.google.com/p/go #Patch Set 9 : diff -r 34e1fd6b8b79 https://code.google.com/p/go #Patch Set 10 : diff -r d739d7e8b0e6 https://code.google.com/p/go #
Total comments: 1
Patch Set 11 : diff -r d739d7e8b0e6 https://code.google.com/p/go #Patch Set 12 : diff -r 36c9c7810f14 https://code.google.com/p/go #
MessagesTotal messages: 7
|