Slice pointer keys are another option but that concept is tricky too.
Matt
On Tuesday, February 6, 2018 at 3:34:54 AM UTC-6, rog wrote:
>
> ... tick, tick, tick, tick... dide-dudi-diddlidedum...di!
>
> func comparable(xs []int) interface{} {
> type elem struct {
>
Thanks for the link!
On Mon, Feb 5, 2018 at 4:22 PM Aliaksandr Valialkin
wrote:
>
>
> On Tuesday, January 30, 2018 at 12:43:38 AM UTC+2, Sina Siadat wrote:
>>
>> Hi Sebastien,
>>
>> Thanks for your comment and question :)
>>
>> > I have one "drive-by-comment" and a question:
On 6 February 2018 at 09:34, roger peppe wrote:
> ... tick, tick, tick, tick... dide-dudi-diddlidedum...di
>
http://www.reactiongifs.com/wp-content/uploads/2011/09/mind_blown.gif
--
You received this message because you are subscribed to the Google Groups
"golang-nuts"
... tick, tick, tick, tick... dide-dudi-diddlidedum...di!
func comparable(xs []int) interface{} {
type elem struct {
first int
rest interface{}
}
var r interface{}
for _, x := range xs {
r = elem{x, r}
}
$ go test -c os/signal
$ ./signal.test
PASS
$ go tool dist test -v
# Testing packages.
# go tool dist test -run=^go_test:archive/tar$
[...]
ok net/url (cached)
ok os 0.677s
ok os/exec 1.414s
--- FAIL: TestTerminalSignal (5.01s)
signal_cgo_test.go:138: "PS1='prompt> '\r\n"
I'm trying to understand why os/signal tests fail on my 10.12 macbook
pro at tip:
$ ./all.bash
[...]
ok net/textproto (cached)
ok net/url (cached)
ok os 0.678s
ok os/exec 1.185s
--- FAIL: TestTerminalSignal (5.01s)
signal_cgo_test.go:138: "PS1='prompt> '\r\n"
signal_cgo_test.go:163: timed out
On Tue, Feb 6, 2018 at 2:54 PM, andrey mirtchovski
wrote:
> $ go test -c os/signal
> $ ./signal.test
> PASS
> $ go tool dist test -v
>
> # Testing packages.
> # go tool dist test -run=^go_test:archive/tar$
> [...]
> ok net/url (cached)
> ok os 0.677s
> ok os/exec
I went ahead and opened a Go 2
proposal: https://github.com/golang/go/issues/23725
Thanks,
Matt
On Tuesday, February 6, 2018 at 3:26:15 PM UTC-6, matthe...@gmail.com wrote:
>
> What do you mean by a "slice pointer key" ?
>
>
> map[*[]Something]string
>
> Then map consumers can do key
>
> Your visitor pattern here seems to not be a "visitor" pattern. I would
> think that the Go equivalent would define an interface, and visit based on
> that interface.
Here’s what the Wikipedia article says:
In essence, the visitor allows adding new virtual functions to a family of
>
Hi!
I have a simple service that has an API for searching things like log
files. One of the API endpoints returns just the matching documents, while
another will try to return the matching records from those documents.
Because this output could be quite large (and so that results stream) I
>
> What do you mean by a "slice pointer key" ?
map[*[]Something]string
Then map consumers can do key comparisons. I originally used this for an
unordered set type.
Matt
On Tuesday, February 6, 2018 at 11:12:06 AM UTC-6, rog wrote:
>
> On 6 February 2018 at 14:55,
See https://play.golang.org/p/cO4LQFk7ew-
Given a struct definition
type S struct { a, b int }
an if statement of the form
if x == S{ 0, 1 } { ... }
yields compile errors such as
prog.go:19:18: syntax error: unexpected }, expecting := or = or comma
prog.go:22:1: syntax error: non-declaration
On Tue, Feb 6, 2018 at 10:31 PM Patrick Smith wrote:
> Obviously I can code around this, but is it a bug that should be
reported?
Not a bug. See https://golang.org/ref/spec#Composite_literals
A parsing ambiguity arises when a composite literal using the TypeName
On Tue, Feb 6, 2018 at 1:37 PM, Jan Mercl <0xj...@gmail.com> wrote:
>
> Not a bug. See https://golang.org/ref/spec#Composite_literals
>
>
>
> A parsing ambiguity arises when a composite literal using the TypeName
> form of the LiteralType appears as an operand between the keyword
>
There are already so many good courses available out there, and most
employers either do white-boarding, a coding challenge, or want to see some
existing code on a public repo such as Github.com. So, IMHO... even with a
'certificate' or 'degree', that would likely not change these
On 6 February 2018 at 14:55, wrote:
> Slice pointer keys are another option but that concept is tricky too.
What do you mean by a "slice pointer key" ?
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe
Hi Lan
I have used memory profiler and CPU profiler.
The CPU profiler told me that the program is spending a lot of time doing
GC (obviously), and memory profiler is telling me there is a huge amount of
memory allocated for json encoding/decoding, which is inevitable for
business logic.
And
Have XML End point - want to capture and validate xml Root Element of the
request
r.POST("/endpoint", func(c *gin.Context) {
// capture and validate if Root Element is correct
// if I use c.Request.Body buffer then c.Bind() will not get data
if c.Bind() == nil {
Hi,Chris!
You can try this:
https://play.golang.org/p/KG4nE2nPvnN
tmp2 = []Useable{tmpType(1),tmpType(2)}
On Thu, Feb 1, 2018 at 1:37 AM, Chris Hopkins wrote:
> Hi
> Sharing my ignorance:
> I didn't realise that although you can switch-case on an interface, an
> array of
backend.FilterIPs should return differentiable error - whether this is a
transient or a permanent error.
I'd use github.com/pkg/errors:
var ErrTransient = errors.New("transient error")
...
func FilterIPs(...) error {
if err != nil && err.IsTemporary() {
return errors.Wrap(ErrTransient,
Hey Gregg
I think that would make it more clear and looks great. I wouldn't want to
take credit for your copy, but I'd be happy to open an issue / PR with this
change. I'm not sure how to best attribute it to you.
Cheers!
-Tim
On Monday, February 5, 2018 at 2:35:47 PM UTC-8, Gregg Townsend
Hi, JM
I'm the maintain of Gobot. Also of GoCV, a Go package for computer vision,
which might be a better option for you here. With GoCV as you can just use
a couple of normal usb webcams, which would likely be a cheaper option, as
well.
You can find info about GoCV at https://gocv.io
Let me
Please go ahead, Tim. I’m not really worried about credit for one
sentence. You can mention me in the comments if you’d like.
Gregg
On Tuesday, February 6, 2018 at 1:11:10 AM UTC-7, thec...@netflix.com wrote:
>
> Hey Gregg
>
> I think that would make it more clear and looks great. I wouldn't
I am seeing this as well when connecting to haproxy 1.8 locally.
About 1 in 1000 requests. They all seem to have the "Connection: Close"
header FWIW.
The backends behind haproxy never see the request.
On Thursday, February 20, 2014 at 6:23:13 PM UTC-8, freeformz wrote:
>
> I send a lot of data
I have a program whose GC pause frequency will quickly go from 40 calls per
minute to 2000 calls per minute in a matter of hours, and the issue is kind
of random on production.
Is there any advice on how to spot the cause of the issue?
--
You received this message because you are subscribed
On Tue, Feb 6, 2018 at 1:34 AM, roger peppe wrote:
> ... tick, tick, tick, tick... dide-dudi-diddlidedum...di!
>
> func comparable(xs []int) interface{} {
> type elem struct {
> first int
> rest interface{}
> }
> var r
On Tue, Feb 6, 2018 at 12:58 AM, Bob Cao wrote:
>
> I have a program whose GC pause frequency will quickly go from 40 calls per
> minute to 2000 calls per minute in a matter of hours, and the issue is kind
> of random on production.
>
> Is there any advice on how to spot
27 matches
Mail list logo