[go-nuts] Subject: Go 1.14.3 and Go 1.13.11 are released

2020-05-14 Thread Andrew Bonventre
Hello gophers, We have just released Go versions 1.14.3 and 1.13.11, minor point releases. View the release notes for more information: https://golang.org/doc/devel/release.html#go1.14.minor You can download binary and source distributions from the Go web site: https://golang.org/dl/

Re: [go-nuts] Go scheduler - What is the purpose of Context(P)?

2020-05-14 Thread Ian Lance Taylor
On Thu, May 14, 2020 at 2:53 PM wrote: > Yes you are right, P is a logical processor holding LRQ of go-routines > The purpose of a P is to limit the amount of total concurrency running Go code. By default we set the number of P's to the number of CPU cores on the system (including

[go-nuts] Re: go swagger client code usage

2020-05-14 Thread Maciej GaƂkowski
There are a few code generators for swagger. The answer kind of depends on which you are using, for example, https://github.com/OpenAPITools/openapi-generator can generate a whole project or just some packages. It depends on the flags used. In general, the *swagger generate client -f

Re: [go-nuts] Go scheduler - What is the purpose of Context(P)?

2020-05-14 Thread overexchange
Yes you are right, P is a logical processor holding LRQ of go-routines On Thursday, May 14, 2020 at 1:44:57 PM UTC-7, Ian Lance Taylor wrote: > > On Thu, May 14, 2020 at 9:28 AM > wrote: > >> I learnt that, >> >> the reason we have context(`P`) introduced in Goruntime, is that we can >> hand

Re: [go-nuts] Go scheduler - What is the purpose of Context(P)?

2020-05-14 Thread Ian Lance Taylor
On Thu, May 14, 2020 at 9:28 AM wrote: > I learnt that, > > the reason we have context(`P`) introduced in Goruntime, is that we can > hand them off(it's LRQ of goroutines) to other OS thread(say `M0`), if the > running OS thread(`M1`) needs to block for some reason. > > > [image: Untitled.png] >

[go-nuts] Re: Unmarshal XML element to interface{}

2020-05-14 Thread Saied Seghatoleslami
I have tried unmarshalling various JSON and XML files with limited success. So I ended up writing a "lexer" along the lines of Rob Pike's lecture in Australia. I have had good success with it in a bunch of projects. I would be very interested to get some comments on what the community

Re: [go-nuts] How url use Html templates?

2020-05-14 Thread Shulhan
> On 14 May 2020, at 23.05, Ali Hassan wrote: > > > Html Templates >{{if .Done}} > > >{{end}} > > My question is this , possible that Url > have string value "/HelloQ/home/" which which show as url link option

[go-nuts] Go scheduler - What is the purpose of Context(P)?

2020-05-14 Thread overexchange
I learnt that, the reason we have context(`P`) introduced in Goruntime, is that we can hand them off(it's LRQ of goroutines) to other OS thread(say `M0`), if the running OS thread(`M1`) needs to block for some reason. [image: Untitled.png] -- Above, we see a

Re: [go-nuts] Unmarshal XML element to interface{}

2020-05-14 Thread luiz . v . nasc
Dude, thanks a lot! Really really really a lot. Em quinta-feira, 20 de agosto de 2015 20:39:45 UTC-3, Matt Harden escreveu: > > You can do that by implementing your own UnmarshalXML method: > https://play.golang.org/p/uoim__Qpeu. You have to make sure to store a > pointer to a slice in the

[go-nuts] Re: Waitgroup.done wont Panic?

2020-05-14 Thread Jake Montgomery
To clarify what Jan said, a Go program exits when main() exits. Since `wg` has a count of 0, the call to wg.Wait() on like 18 doe not wat, so the program exits before your goroutine even has time to run. With slight modification, it does panic as expected: https://play.golang.org/p/ivcfhsu1N9K

[go-nuts] Re: Why I fear Go

2020-05-14 Thread Ali Hassan
Take a chance , someday it you will get reward On Saturday, May 9, 2020 at 10:57:23 PM UTC+5, shammah Zealsham Agwor wrote: > > I have been programming since 2016 but I have never really dived deep into > any language and haven't got a job with any . I decided to change all that > and focus

[go-nuts] How url use Html templates?

2020-05-14 Thread Ali Hassan
Html Templates {{if .Done}} {{end}} My question is this , possible that Url have string value "/HelloQ/home/" which which show as url link option which you can open if you click on that link -- You received this

[go-nuts] Re: Confusion about the doc for ServeMux

2020-05-14 Thread tokers
> > >1. "/codesearch" means a path. "codesearch.google.com/" means a host " >codesearch.google.com" and the subtree path "/". Does it mean that the >latter takes precedence over the former? > > Yes. A pattern starts with a host will be used firstly if matching successfully. > >

Re: [go-nuts] Getting cross-package test coverage data?

2020-05-14 Thread pankaj pipada
Not sure if a tool is required. It can be done with a couple of commands. An elaborate example (of coverage across different types of tests, etc) is provided at: https://www.elastic.co/blog/code-coverage-for-your-golang-system-tests On Thu, May 14, 2020 at 5:50 AM Tom Payne wrote: > What's the

[go-nuts] Confusion about the doc for ServeMux

2020-05-14 Thread Jingguo Yao
https://golang.org/pkg/net/http/#ServeMux says: > Host-specific patterns take precedence over general patterns, so that a handler might register for the two patterns "/codesearch" and "codesearch.google.com/" without also taking over requests for "http://www.google.com/;. 1.

Re: [go-nuts] Waitgroup.done wont Panic?

2020-05-14 Thread Jan Mercl
On Thu, May 14, 2020 at 8:18 AM sperberstephan via golang-nuts wrote: > Here: > https://play.golang.org/p/76AzuAiVGxL > > I thougt If the waitgroup gets below 0 there should be a Panic. > I understand that the goroutine is canceled. So maybe the defer Statement is > Not executed. > But why is

[go-nuts] Waitgroup.done wont Panic?

2020-05-14 Thread sperberstephan via golang-nuts
Hi Folks, Here: https://play.golang.org/p/76AzuAiVGxL I thougt If the waitgroup gets below 0 there should be a Panic. I understand that the goroutine is canceled. So maybe the defer Statement is Not executed. But why is there No warning at the end of Main that some goroutines Had to be