[go-nuts] maybe the best practice for worker pool scheduler, need review my code

2023-02-18 Thread junior zhang
Go Playground - The Go Programming Language Hello everyone, this is a scheduling program similar to a WorkerPool that I implemented in Golang. The purpose of this program is to limit the number of goroutines while still allowing concurrent execution of my ta

[go-nuts] How do tls.Dialer reuse net.Conn

2023-02-18 Thread Jerry OELoo
Hi All: I have a client which will establish TLS connection to backend service. There are two kind of scenarios that I encounter. 1. Direct network: client--->server The client connect directly to server. var d tls.Dialer //... c1 := d.Dial("tcp", addr) It is ok,

[go-nuts] Change in the go homepage

2023-02-18 Thread Hamza
I think it would be really nice to change the "Try GO" section and rename it to "Give it a GO" -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubs

[go-nuts] Re: Best practice for "main.go" to access members of a structure in the real package

2023-02-18 Thread Jason Phillips
There isn't a friend declaration but the Go tool does support a concept of "internal" packages since Go 1.4. Read about it here: https://go.dev/doc/go1.4#internalpackages On Saturday, February 18, 2023 at 12:18:03 AM UTC-5 Pat Farrell wrote: > I'm still struggling with how to setup my access. >

Re: [go-nuts] Another generics question

2023-02-18 Thread Jochen Voss
Thanks a lot! As an aside, the playgound is great. It made this conversation so much easier! All the best, Jochen On Saturday, 18 February 2023 at 01:31:16 UTC Ian Lance Taylor wrote: > On Fri, Feb 17, 2023 at 4:47 PM Jochen Voss wrote:, > > > > I would like to write a type constraint which m