It's because your method receivers are values, not pointers:
func (b Builder) setFirst() {
b.firstElement = "First element"
}
In Go, method receivers work a lot like regular function arguments. When
you call the above method, you're operating on a copy of the Builder
struct. Any time you pass
Hi,
https://go.dev/doc/faq#methods_on_values_or_pointers
>First, and most important, does the method need to modify the receiver? If it
>does, the receiver must be a pointer. (Slices and maps act as references, so
>their story is a little more subtle, but for instance to change the length of
>
I have 2 empty strings in the output. But why?
https://play.golang.com/p/v7zEVBM17YH
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to golang-nuts+unsubscr...@googl
Unless I'm mistaken, you should be retracting "v2.0.0+incompatible", as
that's the actual version known to the Go tool. Retracting "v2.0.0" would
be valid if you were retracting in the "github.com/gomodule/redigo/v2"
module, which it sounds like you aren't.
You wouldn't want to publish v2.0.1 t
I'm using Go to implement an http client and squid as a forward proxy to
send requests to remote servers. Things goes well when using http/1.1 via
proxy or http/1.1, http2 without proxy, however, while using http2 client
via proxy, most of the connections were closed immediately and only one o
On Sun, 2021-12-05 at 13:24 -0800, arthurwil...@gmail.com wrote:
> How is it possible for this test case to ever fail?
>
> // Same allocation should be equal to itself (not crash).
> err := errors.New("jkl")
> if err != err {
> t.Errorf(`err != err`)
> }
>
https://cs.opensou
How is it possible for this test case to ever fail?
// Same allocation should be equal to itself (not crash).
err := errors.New("jkl")
if err != err {
t.Errorf(`err != err`)
}
https://cs.opensource.google/go/go/+/master:src/errors/errors_test.go;drc=519474451a44b861e54466998a893a173bd54c4b;l=24
Not strictly "minimal" -- it uses some keywords twice, and I'm sure it's
longer than it needs to be, but here you go:
https://go.dev/play/p/XPoqfI8RmyH
On Monday, December 6, 2021 at 4:54:04 AM UTC+13 cuiw...@gmail.com wrote:
> show me you code
--
You received this message because you are sub
show me you code
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://group
Hi gophers!
As every year since 2014 we're planning a Go Devroom at FOSDEM. This year
FOSDEM 2022 will be held online on February 5th 202.
This year we're looking for speakers who want to deliver a live or
per-recorded talk as well as many volunteers to help us run the conference.
If you'd lik
10 matches
Mail list logo