Hi,

Optional returns and parameters don't exist in go, what you are referring
to is built-in behavior specific to some features.

A good way to approach what you want is by assigning it to the anonymous
'_' var when you don't want the returned bool.

Hope this helps

Le ven. 27 août 2021 à 16:58, Vasiliy Tolstov <v.tols...@selfip.ru> a
écrit :

> Does it possible to have own func that have string, bool return value,
> but bool value optional?
> Like receiving from channel or get element from map, or like when
> casting to some type interface?
>
> --
> Vasiliy Tolstov,
> e-mail: v.tols...@selfip.ru
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/CACaajQvoPEGMM-KB3uRmibXr_HL_aqz_bb2%3DKT%3DsbQKR4U4Gkw%40mail.gmail.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAL4P9zxQQKHq-CTROXVpmnfGw1vLs9Uy1C%3Duc5o3bFvn%3DBGbig%40mail.gmail.com.

Reply via email to