Can't you use type assertions? https://tour.golang.org/methods/15
-- -- Aldrin Leal, <ald...@leal.eng.br> / http://about.me/aldrinleal On Wed, May 24, 2017 at 4:50 PM, Frank Schröder <frank.schroe...@gmail.com> wrote: > This works but it is somewhat ugly ... > > // l is either a tls.listener or a TCPListener > if strings.Contains("*tls.listener", fmt.Sprintf("%T", l)) { > srv.proto = "https" > } > > -- > 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. > For more options, visit https://groups.google.com/d/optout. > -- 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. For more options, visit https://groups.google.com/d/optout.