[go-nuts] Go Documentation for private github projects

2021-02-19 Thread Sankar P
Hi We have a bunch of private repos in github with Go sources. We want to see the documentation for these repository sources in an easy to click URL. We are comfortable with deploying a FOSS binary/service, which can authenticate to github as a dedicated user and get the repositories. Now I want

Re: [go-nuts] A goroutine question

2021-02-19 Thread Yuwen Dai
After I increase the dimension of matrixes to 1000x1000, the advantage of goroutines appears: using goroutines takes shorter time than not using them. Thanks for all your comments. On Friday, February 19, 2021 at 11:37:39 PM UTC+8 meera wrote: > You can find what's the difference between th

Re: [go-nuts] Data Structure in Go

2021-02-19 Thread Marcin Romaszewicz
What are you looking to learn about data structures? Data structures in Go work the same as in any other language conceptually, just the language syntax to implement the concepts will be different. One of the most commonly used books on data structures and algorithms is the Cormen, Leiserson, Rives

[go-nuts] Data Structure in Go

2021-02-19 Thread Rahul kauraiya
Hello Experts, I am completely new to this programming language. I am highly interested in learning data structures in Go. I am not able to find any good resource to learn in deep. Please share valuable resources to this thread. Thanks and regards, Rahul Kauraiya -- You received this message

Re: [go-nuts] A goroutine question

2021-02-19 Thread Artur Vianna
You can find what's the difference between the two programs yourself by profiling it, it will show the overhead of context switch, goroutine initialization, GC and so forth. Heres some good resources: https://blog.golang.org/pprof https://youtu.be/nok0aYiGiYA On Fri, 19 Feb 2021, 11:46 Yuwen Dai,

Re: [go-nuts] A goroutine question

2021-02-19 Thread Robert Engels
For parallelizing code like this, you will probably see better performance by having each routine process a full row rather than a cell. You amortize the overhead better. Still the matrix is probably too small to make a difference. > On Feb 19, 2021, at 8:56 AM, 'Peter Weinberger ' via golang

Re: [go-nuts] gofmt return multiple function closures

2021-02-19 Thread Wojciech S. Czarnecki
Dnia 2021-02-19, o godz. 05:52:38 Neehar Vijay napisał(a): > Does gofmt assume tab width of 4 or 8? Gofmt uses ascii tab characters. It is up to readers to set tabs width as they please. Hope this helps, -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you

Re: [go-nuts] gofmt return multiple function closures

2021-02-19 Thread Jan Mercl
On Fri, Feb 19, 2021 at 3:46 PM Neehar Vijay wrote: > Is this intentional? Does gofmt assume tab width of 4 or 8? No. Does this look better? https://play.golang.org/p/0NnZmegKVAu Ie. just add a line break between the return values. Gofmt will keep yout choice. -- You received this message be

Re: [go-nuts] Re: ctags & cscope supprot go source code ?

2021-02-19 Thread Ian Lance Taylor
On Fri, Feb 19, 2021 at 6:46 AM Jyoti Rawat wrote: > > syntax error near unexpected token `[' > -bash: /home/necuser/.ctags: line 3: `regex-Go=/func([ \t]+\([^)]+\))?[ > \t]+([a-zA-Z0-9_]+)/\2/d,func/' You are replying to a message that is seven years old. Something may have changed. I suggest

Re: [go-nuts] A goroutine question

2021-02-19 Thread 温博格
A 100-long vector is way too short to show any benefit. goroutines have start-up, scheduling, and shut-down costs. What happens if you try to square the largest matrix you can fit into memory (10,000 by 1?) On Fri, Feb 19, 2021 at 9:46 AM Yuwen Dai wrote: > Hi experts, > > I'm a newbie to go

Re: [go-nuts] A goroutine question

2021-02-19 Thread Ian Lance Taylor
On Fri, Feb 19, 2021 at 6:46 AM Yuwen Dai wrote: > > I'm a newbie to golang. One of my first ideas to use goroutine is to write a > matrix multiplying programme: C = A*B.I though the calculating of every > element of C: c[i][j] = row i of A * column j of B could be run by a > goroutin

[go-nuts] gofmt return multiple function closures

2021-02-19 Thread Neehar Vijay
See attachment. I tried returning two closures from one function, but gofmt formats it oddly. It looks fine with a tab width of 4 (like go-tour), but it looks hideous with a tab width of 8. Is this intentional? Does gofmt assume tab width of 4 or 8? -- You received this message because you ar

[go-nuts] [generics] feedback about generics

2021-02-19 Thread Nishchal Gautam
Hello everyone, First and foremost, thanks a lot for putting this together, it's been amazing. I just wanted to let you guys know that generics is looking very promising for me. Without generics, my codebase has things like: map_user, map_country, map_state etc, they basically take a collection o

[go-nuts] Re: ctags & cscope supprot go source code ?

2021-02-19 Thread Jyoti Rawat
syntax error near unexpected token `[' -bash: /home/necuser/.ctags: line 3: `regex-Go=/func([ \t]+\([^)]+\))?[ \t]+([a-zA-Z0-9_]+)/\2/d,func/' On Thursday, March 20, 2014 at 8:15:36 AM UTC+5:30 mattn wrote: > cat > ~/.ctags > --langdef=Go > --langmap=Go:.go > --regex-Go=/func([ \t]+\([^)]+\))?[

[go-nuts] A goroutine question

2021-02-19 Thread Yuwen Dai
Hi experts, I'm a newbie to golang. One of my first ideas to use goroutine is to write a matrix multiplying programme: C = A*B.I though the calculating of every element of C: c[i][j] = row i of A * column j of B could be run by a goroutine. This is the skeleton of the code: t1 :

Re: [go-nuts] Re: "go1.15 mod tidy" fails if the current project depends on a module containing a file using embed and guarded by "+build go1.16"

2021-02-19 Thread Amnon
go mod tidy has to ignore build tags. Because if it did not ignore build tags, it would delete dependencies needed by other platforms. On Friday, 19 February 2021 at 02:23:45 UTC Ian Lance Taylor wrote: > On Thu, Feb 18, 2021 at 3:29 PM tapi...@gmail.com > wrote: > > > > Thanks for the link.

Re: [go-nuts] Semantics of ReadDirFile.ReadDir

2021-02-19 Thread Piotr Wieczorek
Thanks! piątek, 19 lutego 2021 o 03:21:54 UTC+1 Ian Lance Taylor napisał(a): > On Thu, Feb 18, 2021 at 4:02 PM Piotr Wieczorek wrote: > > > > I'm writing a type implementing ReadDirFile interface, and I have some > doubts how I should implement ReadDir method. > > The comment says on one hand: