proposal: make error handling simpler #60251
Labels
error-handling
Language & library change proposals that are about error handling.
LanguageChange
Proposal
v2
A language change or incompatible library change
Milestone
Currently when we take a look of definition of
append
we would see it is legal to append astring
to abyte slice
as a special case as documentation says:I would like to have similar feature as special case for
error
type:Instead of writing:
We could write:
Which automatically check if
error
type is notnil
and if yes execute block statement.The text was updated successfully, but these errors were encountered: