[go-nuts] Re: What is the time complexity of math.Pow function?

2019-05-16 Thread navneet.kalra via golang-nuts
Yes because we use divide and conquer method to solve recursively the problem and get the solution in O(log(n)) times where n is the power On Thursday, January 14, 2016 at 10:06:39 PM UTC+5:30, Jingguo Yao wrote: > > What is the time complexity of Math.Pow(x, y) function ( >

[go-nuts] Re: Go documentation - how to determine what implements an interface?

2019-05-16 Thread Agniva De Sarker
godoc _is_ the tool serving golang.org (Although now it's split into 2). You just need to enable that flag to get the results you want. Enabling it by default in golang.org is https://github.com/golang/go/issues/11251. Feel free to subscribe to that. On Thursday, 16 May 2019 10:15:56 UTC+2,

Re: [go-nuts] Re: Go documentation - how to determine what implements an interface?

2019-05-16 Thread Michael Jones
The magical Go phrase is "implicitly implements." What you want is to make that explicit in the documentation. On Thu, May 16, 2019 at 1:16 AM 'White Hexagon' via golang-nuts < golang-nuts@googlegroups.com> wrote: > Thanks. Tools are fine, but a new developer has to know about them. So I >

[go-nuts] Re: How to create reusable HTML components using default html/template package

2019-05-16 Thread krdesai77
How do I create template within Nextgen? On Sunday, August 7, 2016 at 5:51:05 PM UTC-4, pj.beta...@gmail.com wrote: > > Coming from another language, I'm starting to port a web app to Go using > default packages to test-drive it but I couldn't find any > standard/recommended way of using

[go-nuts] Re: net.InterfaceAddrs() error and returned addr slice

2019-05-16 Thread jake6502
On Wednesday, May 15, 2019 at 5:00:26 PM UTC-4, Vasiliy Tolstov wrote: > > Hi! I have error from net.InterfaceAddrs() like route ip+net: no such > network interface > i think that error happened because i have docker running that > creates/deletes interfaces in my system. > My question is -

[go-nuts] Re: go 1 template {{if}} condition

2019-05-16 Thread pablogrs
I know this is a quite old topic, but for whoever -like myself- falls in here trying to find binary comparison operators. {{with $x := functionX "value1" "value2"}}{{if eq $x "some-result"}}true{{end}} {{end}} Maybe there weren't in 2013 but exists in 2019

[go-nuts] Passing structures containing other pointers to ioctl: Go vs Cgo memory

2019-05-16 Thread Matt Layher
Hey folks, I'm working on a project that involves an ioctl API on OpenBSD. The idea is that you store a memory address in a union within another structure, and then invoke the ioctl. When it returns, both the structure itself and the memory pointed at by the address in the union are filled

[go-nuts] Re: Go documentation - how to determine what implements an interface?

2019-05-16 Thread 'White Hexagon' via golang-nuts
Thanks. Tools are fine, but a new developer has to know about them. So I think it would still be super useful if golang.org documentation had this information already generated. In bytes.Reader I should be able to see 'Implements ReadSeeker etc', and in ReadSeeker I should be able to see

[go-nuts] Re: Go documentation - how to determine what implements an interface?

2019-05-16 Thread Agniva De Sarker
You can see the documentation by enabling type analysis in godoc. See https://golang.org/lib/godoc/analysis/help.html. Also see https://github.com/golang/go/issues/20131 On Wednesday, 15 May 2019 22:28:46 UTC+2, White Hexagon wrote: > > bytes.Reader is what I was looking for, thanks all! > >