[go-nuts] Re: Printing a slice of structs recursively

2021-09-01 Thread Sean Liao
Try doing it recursively, passing in both the current parent id and indentation level On Thursday, September 2, 2021 at 3:55:01 AM UTC+2 n.erde...@gmail.com wrote: > i need some help with printing a slice of structs which there is a child - > parent relation in the struct. > *type* Emp *struct

[go-nuts] Re: Where to copy vendor to the go docker builder?

2021-09-01 Thread Sean Liao
If you already ran `go mod vendor` outside of docker then there's no need for multilayer caching COPY . . RUN go build On Thursday, September 2, 2021 at 3:54:54 AM UTC+2 kis...@gmail.com wrote: > I'm trying to make docker build faster for software that are built with > golang > tried to cache

[go-nuts] Printing a slice of structs recursively

2021-09-01 Thread erdem erdem
i need some help with printing a slice of structs which there is a child - parent relation in the struct. *type* Emp *struct* { id int name string parentID int } probably the best way to do it recursively but i couldnt manage to do https://play.golang.org/p/jHcbu3

[go-nuts] Where to copy vendor to the go docker builder?

2021-09-01 Thread K Prayogo
I'm trying to make docker build faster for software that are built with golang tried to cache layer but it still slow when dependency changed since go mod download have to redownload whole dependency again and again. how to make use vendor directory on docker build? (where to copy? so go build

Re: [go-nuts] Managing perpetually running goroutines

2021-09-01 Thread Bakul Shah
Suggest you look at https://go.dev/blog/pipelines And check out the two videos recommended at the end of this article. Lots of interesting articles in the blog for you to chew on! -- Bakul > On Sep 1, 2021, at 2:55 PM, sanyia.said...@gmail.com wrote: > > Thanks Bryan, especially for the code ex

RE: [go-nuts] Managing perpetually running goroutines

2021-09-01 Thread sanyia.saidova
Thanks Bryan, especially for the code example.Would using a sync.WaitGroup in place of the `done` channel in your example be overkill? Just exploring what’s possible here for my own education. From: 'Bryan C. Mills' via golang-nutsSent: 31 August 2021 20:22To: golang-nutsSubject: Re: [go-nuts] Mana

Re: [go-nuts] Re: fonts, bitmap and the (old TeX) PK file format

2021-09-01 Thread Howard C. Shaw III
Cool. As to the Postscript interpreter, look at https://github.com/llgcode/ps Also, font specific https://github.com/golang/image/blob/master/font/sfnt/postscript.go Not sure how much either helps towards Type 1 support. Even Adobe is end of lifing Type 1 support, though, so it might be wort

Re: [go-nuts] Re: fonts, bitmap and the (old TeX) PK file format

2021-09-01 Thread 'Sebastien Binet' via golang-nuts
Howard, On Wed Sep 1, 2021 at 18:11 CET, Howard C. Shaw III wrote: > You would implement the Face interface to have your fonts available to > Go's > text drawing routines. You can try using basicfont directly, however it > is > fixedwidth only. But just implementing the interface does not seem tha

[go-nuts] Re: fonts, bitmap and the (old TeX) PK file format

2021-09-01 Thread Howard C. Shaw III
You would implement the Face interface to have your fonts available to Go's text drawing routines. You can try using basicfont directly, however it is fixedwidth only. But just implementing the interface does not seem that onerous. Have a look at https://github.com/hajimehoshi/bitmapfont for a

[go-nuts] Re: Questions about documentation of Go standard library

2021-09-01 Thread Kamil Ziemian
Kurtis Rader, peterGo thank you for the answers. I probably need to learn more about RPC protocols, for now I can only expand acronym. But this point with ignoring leading zeros is clear enough. And probalby more "elementary (and stupid)?" questions is comming. Kamil poniedziałek, 30 sierpnia

[go-nuts] Debugging "fatal: morestack on gsignal"

2021-09-01 Thread varun...@gmail.com
Hello, Recently we have been seeing multiple occurrences of "fatal: morestack on gsignal" error in our system tests. The issue happens with golang 1.13.7 and golang 1.16.5 runtimes. The process restarts after this error and no stack trace is dumped. Our process uses CGO calls, I/O ops etc. So