You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This change simplifies the SetOptions machinery by
eliminating the (public) OptionsResult and Options
types and their methods, and using simpler standalone
functions of these forms:
setT(dest *T, value any) error
asT(value any) (T, error)
The code is clearer and significantly shorter.
Details:
- rename SetOptions to Options.Set.
- return only the errors, not the OptionsResults;
server.handleOptionResult renamed handleOptionErrors.
- remove error result from server.handleOptionResult,
per preexisting TODO.
- add missing doc comments.
- use JSON terminology in error messages.
Note, minor behavior changes:
- the buildFlags and directoryFilters flags now use
asStringSlice (per the preexisting TODO), and also
templateExtensions, but this replaces Sprint(x)
with asString(x), which is strictly speaking an
incompatible change.
Change-Id: Ib2169ba8e1db1a34e9bc269e6e8cef3a6763e6e6
Reviewed-on: https://go-review.googlesource.com/c/tools/+/592536
Reviewed-by: Robert Findley <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
0 commit comments