[go-nuts] Go compiler - questions about escape analysis.

2021-05-19 Thread messi...@gmail.com
Hi, I'm reading the go compiler source code and now come to the escape analysis part, I just can't figured out the following question so I want to get some help from the community: What's the meaning of location.transient

Re: [go-nuts] Go compiler - syntax tree vs AST?

2021-05-19 Thread messi...@gmail.com
> I don't know of a way to dump the former, but perhaps there is one. It seems there's no way to dump the former tree through any compiler flag by now. The dumper entry point is Fdum

Re: [go-nuts] Is it possible to produce coverage profiles for *_test.go files?

2021-05-19 Thread Rob Pike
You could run go tool cover yourself, but getting the details right can be difficult. Instead, I suggest moving the test code into the main package, but protected by a build tag and called from the real test. foo_test.go: func TestFoo(t *testing.T) { mainTestFoo(t) } foo.go: func mainTestFoo(t

[go-nuts] A little love for x/oauth2

2021-05-19 Thread cpu...@gmail.com
I've recently worked a bit with oauth2 and noticed that issue tracker and PRs could use a little love. Quite a number of PRs have gone through Gerrit review without merging and the issues contain some imho valid points. Is there a policy for maintaining x/oauth2 or putting it into slower mainte

[go-nuts] Delve v1.6.1 released

2021-05-19 Thread Derek Parker
Hello Gophers! New Delve release day! Delve v1.6.1 is released today! This release contains 2 new commands, new options for existing commands, bug fixes and more! Check out the changelog for more details: https://github.com/go-delve/delve/blob/master/CHANGELOG.md#161-2021-05-18. -- You rece

Re: [go-nuts] Syscalls that take structs with embedded pointers

2021-05-19 Thread Ian Lance Taylor
On Fri, May 14, 2021 at 7:28 AM 'Michael Pratt' via golang-nuts wrote: > > Go has a non-moving GC [1], so that is not an issue. That said, > unsafe.Pointer states "the referenced allocated object, if any, is retained > and not moved until the call completes". It doesn't say that this recursively

Re: [go-nuts] cancel method of timerCtx of context package

2021-05-19 Thread Ian Lance Taylor
On Wed, May 12, 2021 at 6:43 PM qinggeer Bao wrote: > > In the cancel method of timerCtx type: > > func (c *timerCtx) cancel(removeFromParent bool, err error) { > c.cancelCtx.cancel(false, err) > if removeFromParent { > // Remove this timerCtx from its parent cancelCtx's children.

Re: [go-nuts] Guarantee tcp pkt delivery

2021-05-19 Thread Perry Couprie
Op wo 19 mei 2021 13:37 schreef Amarjeet Anand : > Hi > > Consider a sequence of events--- > > 1. Tcp server started on port 8080 using *net.Listen("tcp", ":8080")* > > 2. Tcp client established a connection using *net.Dial("tcp", ":8080") *and > received a *conn* object. > > 3. Tcp server is forc

Re: [go-nuts] Guarantee tcp pkt delivery

2021-05-19 Thread Jesper Louis Andersen
On Wed, May 19, 2021 at 1:37 PM Amarjeet Anand wrote: > Consider a sequence of events--- > > 1. Tcp server started on port 8080 using *net.Listen("tcp", ":8080")* > > 2. Tcp client established a connection using *net.Dial("tcp", ":8080") *and > received a *conn* object. > > 3. Tcp server is force

[go-nuts] Re: Guarantee tcp pkt delivery

2021-05-19 Thread Brian Candler
For detailed explanation from a TCP and sockets point of view, see: https://stackoverflow.com/questions/11436013/writing-to-a-closed-local-tcp-socket-not-failing (This is described the opposite way round, where the client closes the socket then the server tries to write, but it's the same: onc

[go-nuts] Guarantee tcp pkt delivery

2021-05-19 Thread Amarjeet Anand
Hi Consider a sequence of events--- 1. Tcp server started on port 8080 using *net.Listen("tcp", ":8080")* 2. Tcp client established a connection using *net.Dial("tcp", ":8080") *and received a *conn* object. 3. Tcp server is force killed. 4. Now when the tcp client performs *conn.Write()*, thi

Re: [go-nuts] How can I check error types of gRPC calls?

2021-05-19 Thread burak serdar
Here is something I did to pass custom error information: Based on the grpc code, if an error type has GRPCStatus() *status.Status function, then grpc gets the status information using that method. For the error types that can go through grpc, I have this method below: func (e MyError) GRPCStatus

[go-nuts] Is it possible to produce coverage profiles for *_test.go files?

2021-05-19 Thread Piers Powlesland
I'm working on a project with some quite complex test code and I'd like to be able to understand what parts of it are executing for certain tests. I generated coverage using the go test -coverprofile=coverage.out command but the coverage file only seems to contain information for non test

Re: [go-nuts] How to cast a multi-value?

2021-05-19 Thread Brian Candler
On Tuesday, 18 May 2021 at 21:09:18 UTC+1 Amnon wrote: > My understanding was that a string had a pointer and a length > Yes indeed - sorry my brain was disengaged :-) > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this