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
NOTE
The context and error return are optional in the module's function signature; remove them if you don't need them.
but not all developers will know when they need them or not.
In fact we have a Hello function that uses context, but doesn't need it, which is confusing.
We should expand to say something like
NOTE
The context and error return are optional in the module's function signature. Remove `context` in arguments if you don't need to use it in a leaf/terminal function like Stdout(ctx), Export(ctx, ...), Publish(ctx, ...). Remove `error` in return values if you handle all errors within the module and don't need to propogate them.
We should simplify the Hello function to remove context since it doesn't need it.
What is the issue?
Today we have a note box in the docs that says
https://docs.dagger.io/manuals/developer/go/264203/functions/
but not all developers will know when they need them or not.
In fact we have a
Hello
function that usescontext
, but doesn't need it, which is confusing.We should expand to say something like
We should simplify the
Hello
function to removecontext
since it doesn't need it.The text was updated successfully, but these errors were encountered: