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
I would like to have my own struct, where I can assign mDNS service to mdns.NewMdnsService():
typeMyStructstruct {
mdnsService*mdns.mdnsService// Error: name mdnsService not exported by package typesinternal#UnexportedName
}
// Meaning, this is currently NOT possibleMyStruct.mdnsService=mdns.NewMdnsService(p2pHost, "something", &mDNSNotifee{host: p2pHost})
iferr:=MyStruct.mdnsService.Start(); err!=nil {
panic(err)
} else {
log.Println("mDNS service started")
}
If you would expose the mdns.mdnsService struct (just like you already do expose dht.IpfsDHT), I could assign it to my own struct.
Meaning it be much easier to later call a MyStruct.mdnsService.Close() on it for example. Maybe its just me, but I think it makes sense to export a struct that is getting returned by a public function.
The text was updated successfully, but these errors were encountered:
I would like to have my own struct, where I can assign mDNS service to
mdns.NewMdnsService()
:If you would expose the
mdns.mdnsService
struct (just like you already do exposedht.IpfsDHT
), I could assign it to my own struct.Meaning it be much easier to later call a
MyStruct.mdnsService.Close()
on it for example. Maybe its just me, but I think it makes sense to export a struct that is getting returned by a public function.The text was updated successfully, but these errors were encountered: