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
Currently, all example functions must return nothing. However, it is common
for examples to call things which might possibly return errors. Printing the
error, panicking, ignoring it or calling log.Fatal is not ideal for an example where
real code would almost always just return the error. It makes the example code
less representative of the actual code and more cluttered.
I propose that example functions should be allowed to return an error,
For runnable examples, tests would fail if the example
returns a non-nil error.
josharian, sgen, Dr-Terrible, quasilyte, DeedleFake and 9 more