Re: [go-nuts] godoc and generic code

2022-11-03 Thread tapi...@gmail.com
You may also try Golds: https://github.com/go101/golds. Still not perfect in handling custom generic things, but it is generally usable. On Friday, November 4, 2022 at 1:26:26 AM UTC+8 Hotei wrote: > Thanks for the very helpful replies. < go doc -all pkg > should meets my > needs for printed doc

Re: [go-nuts] fs.Glob, fs.DirWalk, etc. does the pattern support complex regex

2022-11-03 Thread James
It makes the pattern a bit ugly, but you can definitely do it with path.Match https://go.dev/play/p/zi6nh8Vj9LF On Fri, 4 Nov 2022 at 09:20, pat2...@gmail.com wrote: > This has to be a FAQ, but my google foo for searching it is not clear > The docs say: " The syntax of patterns is the same as in

[go-nuts] Re: about upstream?

2022-11-03 Thread TheDiveO
I've seen both usages depending on the writers' perspectives. For that reason I avoid the terms upstream and downstream in this context (services) like the plague and always ask people for clarification without using these two words. It's always fun to see this then sparking totally surprised r

[go-nuts] fs.Glob, fs.DirWalk, etc. does the pattern support complex regex

2022-11-03 Thread pat2...@gmail.com
This has to be a FAQ, but my google foo for searching it is not clear The docs say: " The syntax of patterns is the same as in path.Match." The pattern seems to implement only fairly simple search expressions. I'd like to search for "./*.MP4", but of course to be platform independant I have to se

Re: [go-nuts] There is a passage in book that is difficult to understand, can anyone help explain it?

2022-11-03 Thread Robert Engels
In past reviews it seems to me that non reentrant locks simply lead to course locks. Reentrent allow for proper function decomposition. Without them you see a lot of methods in Go like “doXWithLock” - and function decomposition is done via duplicative private methods. > On Nov 2, 2022, at 10:1

Re: [go-nuts] godoc and generic code

2022-11-03 Thread Hotei
Thanks for the very helpful replies. < go doc -all pkg > should meets my needs for printed documentation. I guess I will have to weigh the convenience of navigating which the godoc html version provides vs the inconvenience of "instantiating" the methods required by the types [T] I use in this

Re: [go-nuts] How does the go compiler treat initialized string variables?

2022-11-03 Thread Konstantin Khomoutov
On Tue, Nov 01, 2022 at 11:18:48AM -0700, Frank Jüdes wrote: > I have to write a program that should verify the content of > configuration-servers. It will need a lot of pre-initialized data to verify > the actual content of a server, so it has to initialize many strings. What > i know from oth

[go-nuts] go[runtime.rt0_go]: why should 104 be subtracted from g0 stack 64k?

2022-11-03 Thread liiux...@gmail.com
asm_amd64.s Please explain why 104 should be subtracted from g0 stack? ```go TEXT runtime·rt0_go(SB),NOSPLIT|TOPFRAME,$0 // copy arguments forward on an even stack MOVQDI, AX// argc MOVQSI, BX

Re: [go-nuts] Understanding some gotchas with linking slices together via indexing

2022-11-03 Thread Konstantin Khomoutov
On Tue, Nov 01, 2022 at 09:38:20PM -0700, Brian, son of Bob wrote: > Can anyone explain these gotchas (demo )? > I've tried reading articles on this [one , [...] > but they don't go into enough detail. Because that's an intr

Re: [go-nuts] godoc and generic code

2022-11-03 Thread 'Sebastien Binet' via golang-nuts
On Thu Nov 3, 2022 at 14:02 CET, Jan Mercl wrote: > On Thu, Nov 3, 2022 at 12:49 PM Hotei wrote: > > > I added some generic code to a project and godoc doesn't seem to like that > > and stops working when it sees the generics. It's a 4 year old version of > > godoc so that's perhaps not a surpr

Re: [go-nuts] godoc and generic code

2022-11-03 Thread Jan Mercl
On Thu, Nov 3, 2022 at 12:49 PM Hotei wrote: > I added some generic code to a project and godoc doesn't seem to like that > and stops working when it sees the generics. It's a 4 year old version of > godoc so that's perhaps not a surprise. What is a surprise is that godoc > isn't shipped wit

[go-nuts] godoc and generic code

2022-11-03 Thread Hotei
I added some generic code to a project and godoc doesn't seem to like that and stops working when it sees the generics. It's a 4 year old version of godoc so that's perhaps not a surprise. What is a surprise is that godoc isn't shipped with go any longer. Is there a version that handles gener

Re: [go-nuts] Occasional hard lockup w/ 100% CPU usage in go applications

2022-11-03 Thread Konstantin Khomoutov
On Mon, Oct 31, 2022 at 09:32:21AM -0700, Steven Sokol wrote: > I tried sending SIGABRT, but the process did not respond - continued > running in the runaway state. I can kill it with SIGKILL but that doesn't > generate a core. Can you suggest a specific kill command that will? Thanks! Sending

Re: [go-nuts] about upstream?

2022-11-03 Thread Konstantin Khomoutov
On Wed, Nov 02, 2022 at 02:15:51AM -0700, xie cui wrote: > there are two micro service writen in go, let's call them A and B. A will > call B. In this scene we will call B is the upstream of A. or A is the > upstream of B? which one is correct way? I'm not a native speaker but I would say that