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
corre
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 receive
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 ret
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: 1556
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 OnRollback(ctx
Sounds like a good solution. Thanks!
Steve
On Thu, Dec 8, 2016 at 9:12 AM, Andy Balholm wrote:
> So the set of devices keeps changing.
>
> I think you can make an http.Transport with a custom DialTLS function that
> always uses an up-to-date TLS config.
>
> Andy
--
You received this message b
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 self-signed certs for all
> the