Is there a way to declare an array (or slice) that is indexed by a type
derived from int, rather than indexed by int? My intent is to have the
compiler complain if I index the array/slice with a generic int rather than
the specific int-derived type I'm supposed to use. This will help verify
Can anyone point me to a recipe or guidance on how to set up a
cross-compilation environment on a Mac that will allow me to build
CGO-enabled Go code to run on Ubuntu? The program I'm building is pure Go
except for an unavoidable dependency on libsqlite3.
Thanks in advance,
Steve
--
You
I just wrote some code for graceful restart of a web server, following
models available on the web. Unlike those models, my code didn't work.
The parent (old) web server refused to exit. The call to server.Shutdown
returned success, and the listener got closed, but the server.Serve call
never
Hi, folks,
I'm trying to track down a memory leak in a web server application, and I'm
having a hard time making sense of the output of the heap dumps emitted by
the net/http/pprof handlers. One of the dumps starts with:
heap profile: 5: 192080 [47408: 90679856] @ heap/1048576
1: 155648 [1:
I'd like input on whether the following idea is good or bad, and why.
Consider an abstract transaction, modeled as follows:
func Transaction(ctx context.Context, body func(ctx context.Context) error)
error
func OnCommit(ctx context.Context, commitHook func(ctx context.Context))
func
Well, because when someone wants to import a new device, I can't change the
existing Transport. The docs explicitly say not to change it once it's in
use.
Steve
On Thu, Dec 8, 2016 at 8:42 AM, Andy Balholm wrote:
> Why not make a tls.Config that trusts all the