I wonder if there is a way to implement a function that behaves similar to map getter: it returns return value as first argument and (optionally assigned) second value ok<
ok<
No, it can't be done, the only option is to return a pointer and check if it's nil.
if v := f(10); v != nil { //stuff }