The text was updated successfully, but these errors were encountered:
xrfang
changed the title
proposal fluent interface for json SetIndent/SetEscapeHTML
proposal: fluent interface for json SetIndent/SetEscapeHTML
Jul 11, 2019
As a pure style point, Go code tends to use fluent interfaces less than in some other languages, in part because fluent interfaces don't work in Go for functions/methods that need to return errors.
OK, I am curious why this would break compatiblity?
If a function returns 1 variable, you now return 2, or none, that's a break of compatibility, but if the function originally returns nothing, now you return one (or any more) that will not affect any existing code?
rsc
changed the title
proposal: fluent interface for json SetIndent/SetEscapeHTML
proposal: encoding/json: fluent interface for SetIndent/SetEscapeHTML
Jul 16, 2019
In the stdlib, it's defined as:
I suggest to make it fluent by:
So that it is more convenient to do this:
The text was updated successfully, but these errors were encountered: