I know, so my question is - does it possible to write such functions like builtin? For example I can create func via reflect....
пт, 27 авг. 2021 г. в 18:03, Levieux Michel <mlevieu...@gmail.com>: > > 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. -- 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/CACaajQsJ3KeKMStEWvUYtgGnmZMX1gbq_vbt73k6TM2LTkepUA%40mail.gmail.com.