Suppose I have a long-running computation that I wish to be cancelable via
a context. By this I mean something that's just churning away on some
computation, not blocking on a syscall or I/O operation or anything like
that. Should I just poll ctx.Err() periodically in the inner loop of my
computati
/groups.google.com/forum/#!searchin/golang-nuts/byte$20slice$20string$20copy|sort:relevance/golang-nuts/fXmG83gZOJg/eixtKSQiNysJ
>
>
> On Monday, February 13, 2017 at 9:31:06 PM UTC+1, Alex Flint wrote:
>
> As of go1.8, do conversions between strings and byte slices always
> generate a copy?
As of go1.8, do conversions between strings and byte slices always generate
a copy?
I understand the immutability guarantees in the language spec, but I'm
interested in this from an efficiency standpoint. I can imagine a compiler
that analyzes whether a byte slice created from such a conversion
Recently while using http.ReverseProxy I wanted to take a specific action
if there was a TCP connection failure or other transport-level failure in
ReverseProxy.ServerHTTP. However, ReverseProxy.ServeHTTP simply sets a
BadGateway status code in this situation, which makes it impossible to
different
I'm working with busybox, which does not ship with CA roots.
On Sat, Dec 17, 2016 at 12:26 AM Konstantin Khomoutov <
flatw...@users.sourceforge.net> wrote:
> On Thu, 15 Dec 2016 16:35:09 +0000
> Alex Flint wrote:
>
> > Does anyone know of a golang package that embeds
Does anyone know of a golang package that embeds (go-bindata or similar) a
reasonable standard set of CA roots? Ideally such a package would provide a
ready-to-use http.Client.
For context, I'm building minimal docker images containing go binaries that
need to make https connections to some third
wrote:
> On Mon, Sep 19, 2016 at 3:21 PM, Alex Flint wrote:
> > I am looking for help understanding the following lines in a Go
> traceback:
> >
> > 6 File "specialized.go" line 163 in pythontype.ExplicitFunc.Call
> > 7 File "" line 510 in pythont
I am looking for help understanding the following lines in a Go traceback:
6 File "specialized.go" line 163 in pythontype.ExplicitFunc.Call
7 File "" line 510 in pythontype.(*ExplicitFunc).Call
8 File "propagate.go" line 622 in
pythonstatic.(*propagator).evaluateCallExpr
I am trying to understand
Is it possible to have a struct that implements an interface, but have
pointers to the struct not implement the interface? The reason is that I
want to find all the places in our codebase that attempt to use a pointer
to a certain struct as a certain interface.
--
You received this message becaus
I am using cgo to wrap a library that creates an OSX UI, which requires
things to be run on the "main thread". Sometimes my cgo calls end up on the
main thread and sometimes they do not (I check this with [NSThread
isMainThread]). I understand that cgo threads are guaranteed to run on an
OS-allocat
the underlying compressor
state. Or perhaps I'm looking in the wrong package - any pointers would be
appreciated.
On Wed, Aug 10, 2016 at 3:42 PM Ian Lance Taylor wrote:
> On Wed, Aug 10, 2016 at 3:27 PM, Alex Flint wrote:
> >
> > I have long list of short strings that I w
I have long list of short strings that I want to compress, but I want to be
able to decompress an arbitrary string in the list at any time without
decompressing the entire list.
I know the list ahead of time and it doesn't matter how much preprocessing
time is involved. It is also fine if there is
Is it intended that gob-encoding a pointer to an integer with value equal
to zero decodes as a nil pointer? I was expecting to get back a non-nil
pointer to an integer with value zero.
https://play.golang.org/p/UUN0UFEeIN
I understand that gob omits zero values but my understanding was that a
non
Is it possible to use reflection to retrieve the value of x
from reflect.ValueOf(x.SomeMethod) where x is an instance of some struct
type?
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails fr
Sorry to keep bothering you folks with this but does anybody have an answer
to this?
On Tue, Jun 21, 2016 at 9:26 AM Alex Flint wrote:
> Oh I expected that since I only called encoder.Encode once, there would
> only be on repetition of the outermost segment. I was expecting the
> wireT
t; -rob
>
>
> On Tue, Jun 21, 2016 at 8:20 AM, Alex Flint wrote:
>
>> The gob docs state that a gob stream consists of
>>
>> (byteCount (-type id, encoding of a wireType)* (type id, encoding of
>> a value))*
>>
>> I was expecting byteCount to be
The gob docs state that a gob stream consists of
(byteCount (-type id, encoding of a wireType)* (type id, encoding of a
value))*
I was expecting byteCount to be the number of bytes remaining in the entire
packet, but that does not seem to be the case. For example when encoding a
single instan
code. Whenever I make changes to Go sources in
mypkg I can see that the cgo compiler is being run on go-sqlite3.
On Wed, Jun 15, 2016 at 3:23 PM Ian Lance Taylor wrote:
> On Wed, Jun 15, 2016 at 2:54 PM, Alex Flint wrote:
> > Under what conditions does a cgo package get recompiled? I a
Under what conditions does a cgo package get recompiled? I am using
go-sqlite3 and it appears that the C compiler/linker is run every time I
build my project, even though I am not changing any of the C sources. I
would have expected it to be run once and then the results re-used, but
perhaps there
19 matches
Mail list logo