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
roups.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 c
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
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
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 <alex.fl...@gmail.com> wrote:
>
> > Does anyone know of a gol
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
t;i...@golang.org> wrote:
> On Mon, Sep 19, 2016 at 3:21 PM, Alex Flint <alex.fl...@gmail.com> wrote:
> > I am looking for help understanding the following lines in a Go
> traceback:
> >
> > 6 File "specialized.go" line 163 in pythontype.ExplicitFunc.Call
>
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
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
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 <i...@golang.org> wrote:
> On Wed, Aug 10, 2016 at 3:27 PM, Alex Flint <alex.fl...@gmail.com> wrote:
> >
> > I have long l
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 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
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
r.
> -rob
>
>
> On Tue, Jun 21, 2016 at 8:20 AM, Alex Flint <alex.fl...@gmail.com> wrote:
>
>> The gob docs state that a gob stream consists of
>>
>> (byteCount (-type id, encoding of a wireType)* (type id, encoding of
>> a value))*
>>
>>
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
15 matches
Mail list logo