Re: [go-nuts] Beginner question about interface

2018-04-28 Thread Jan Mercl
On Sat, Apr 28, 2018 at 8:56 AM wrote: > I want to search in all library (which have source code) If the above means the standard library: either local godoc search or https://golang.org/search?q=Read. But as you can see, you'll get a vast amount of hits. > for exmaple : >

Re: [go-nuts] Beginner question about interface

2018-04-28 Thread Bakul Shah
On Apr 27, 2018, at 11:56 PM, k1atti...@gmail.com wrote: > > I want to search in all library (which have source code) > Maybe i don't understand the concept of Golang (I have delphi,c++,c > background) > > > for exmaple : > I see this. This function need an interface type : r > func

Re: [go-nuts] Beginner question about interface

2018-04-28 Thread Wojciech S. Czarnecki
On Fri, 27 Apr 2018 22:06:07 -0700 (PDT) k1atti...@gmail.com wrote: > How can i get a list of types which implement a particular interface ? ( > for exmaple io.Reader) By using a tool named 'guru'. http://golang.org/s/using-guru https://godoc.org/golang.org/x/tools/cmd/guru Unlike in

Re: [go-nuts] Beginner question about interface

2018-04-28 Thread k1attila1
Thank you But how do you know which types has this method ? Thank you Attila (Én voltam az aki már irt neked egyszer, de még mindig csak küzdök ezzel a Goval - szerencse csak hobbi.) 2018. április 28., szombat 9:00:27 UTC+2 időpontban Tamás Gulácsi a következőt írta: > > See what an

Re: [go-nuts] Beginner question about interface

2018-04-28 Thread Volker Dobler
On Saturday, 28 April 2018 08:56:18 UTC+2, k1at...@gmail.com wrote: > > But which type satisfy this r parameter ? > This question has no interesting answer. Or put it the other way around: What would you do with an answer to this question? _Any_ io.Reader is okay. And the information that

Re: [go-nuts] Beginner question about interface

2018-04-28 Thread Tamás Gulácsi
See what an io.Reader is: just one method, a "Read([]byte) (int, error)". So if a type has such method, it can be used as an io.Reader. No explicit declaration ("implements") is needed! -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To

Re: [go-nuts] Beginner question about interface

2018-04-28 Thread k1attila1
I want to search in all library (which have source code) Maybe i don't understand the concept of Golang (I have delphi,c++,c background) for exmaple : I see this. This function need an interface type : r func NewScanner(r io .Reader

Re: [go-nuts] Beginner question about interface

2018-04-28 Thread Jan Mercl
The answer depends on the scope you want to search. Which scope you want to search? Also, please share what purpose does that information serve. I cannot imagine a one. On Sat, Apr 28, 2018, 07:06 wrote: > Hi > > How can i get a list of types which implement a particular

[go-nuts] Beginner question about interface

2018-04-27 Thread k1attila1
Hi How can i get a list of types which implement a particular interface ? ( for exmaple io.Reader) Thank you in advance Attila -- 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,