Re: [go-nuts] DeepCloning a datastructure
And, I realized just after posting that your data structure has private fields in it as https://github.com/mohae/deepcopy won't work on those. On Thu, Apr 16, 2020 at 9:02 PM Hugh Emberson wrote: > On Thu, Apr 16, 2020 at 2:07 PM Marc Schöchlin wrote: > >> i am searching for a convenient way to deep-clone a nested datastructure. >> > > I've used https://github.com/mohae/deepcopy with some success. YMMV. > > Regards, > Hugh > > -- 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/CAJ5gAGmwjnqOtHeE17ScyM7SUZymrb9D-MJ4VG%3DD9Zo6oKesxQ%40mail.gmail.com.
Re: [go-nuts] DeepCloning a datastructure
On Thu, Apr 16, 2020 at 2:07 PM Marc Schöchlin wrote: > i am searching for a convenient way to deep-clone a nested datastructure. > I've used https://github.com/mohae/deepcopy with some success. YMMV. Regards, Hugh -- 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/CAJ5gAGmUQYRW04%3DkSM2DfiMQhVCQg6xPnZ8ohaOGBPjsaUF8nQ%40mail.gmail.com.
Re: [go-nuts] expvar when not using global mux
You can access the global mux as 'http.DefaultServeMux' and since a mux is a 'http.Handler' you can add it to another mux like this: myMux.Handle("/debug/", http.DefaultServeMux) On Sun, Aug 21, 2016 at 10:46 AM, Amit Upadhyay wrote: > expvar registers expvarHandler as init(), which registers it to global > mux. This is convenient in general. In my app I have a non global mux, and > I have no way to register it. In case of net/http/pprof the handlers are > exported. > > I have ended up copying expvarHandler() in my project. > > Should I file a bug to export expvarHandler? > > -- > 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.
Re: [go-nuts] caching of cgo compilation
He might be running go test which also seems to rebuild everything every time unless it has been installed. go test -i installs all the dependencies for a test and fixes this problem. On Wed, Jun 15, 2016 at 6:14 PM, Dave Cheney wrote: > My guess is you are using go build, which compiles then discards > everything it just compiled (unless what was compiled was a main package, > in which case the binary will be left in your current working directory) > > I recommend using go install -v rather than go build for general use. > > -- > 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.