If the slice is empty, it doesn't reference anything.
If it is not empty, &x[0] can be used to identify the slice (potentially
also using len/cap, if it's interesting).
On Tue, Nov 10, 2020 at 4:11 AM arpad ryszka wrote:
> Hi,
>
> is there a way to detect the cyclic reference in the following ex
If the logic is the same, wrap the field in an accessor method and use an
interface.
> On Nov 9, 2020, at 9:11 PM, Brandon Busby
> wrote:
>
> I have structs with duplicate fields and duplicate code to go along with
> them. The problem is that the duplicate code does make use of non-common
Thanks! Maybe it will help.
вт, 10 нояб. 2020 г. в 01:21, seank...@gmail.com :
> maybe setting GODEBUG=http2debug=2 to spit out some logs?
>
> On Monday, November 9, 2020 at 5:49:57 PM UTC+1 telyuk...@gmail.com wrote:
>
>> Hello!
>>
>> I use third-party software with my own code to build reverse-
We are looking for Go Engineers and willing to train up Java, C# or other
enterprise developers. We were named by Fast Company as one of the top 50
most innovative companies.
For more information post here or feel free to reach out to me directly at
pablo.pe...@omaze.com
https://boards.greenh
I have structs with duplicate fields and duplicate code to go along with
them. The problem is that the duplicate code does make use of non-common
fields. Here is an example of the code.
https://play.golang.org/p/IkoNJTdoVLD
I could extract the duplicate code sections into a method, eliminatin
Hi,
is there a way to detect the cyclic reference in the following example
somehow? Either via reflection or by other means? My understanding is that
slices cannot be compared with == (unless to nil), or used as keys in maps.
Is there a different way?
l := []interface{}{"foo"}
l[0] = l
fmt.Pri
thanks all, i find a race problem, and fix it.
在2020年11月7日星期六 UTC+8 上午5:28:51 写道:
> OK, so you're not using Cgo, that leaves some other unsafe use, a data
> race or unlikely some weird compiler bug.
>
> I'd start looking in api.handleDPriceRange to see where the string
> input to strconv.ParseFl
Hello gophers,
We plan to issue Go 1.15.5 and Go 1.14.12 on Thursday, November 12.
These are minor releases that include security fixes.
Following our policy at https://golang.org/security,
this is the pre-announcement of those releases.
Cheers,
Katie on behalf of the Go team
--
You re
Hm, yep. Very similar. Interestingly, the only cohesive objections I can
see in those threads are to the minor details that are different from what
I'm saying. Still, though - at least the idea has been presented before.
Jeremy French
607-444-1725
On Mon, Nov 9, 2020, 2:57 PM Ian Lance Taylor wr
On Mon, Nov 9, 2020 at 11:20 AM Jeremy French wrote:
>
> First, the caveat. I know error handling is a long-standing discussion. I
> know there has been lots of debate on error handling, and it can seem like
> there are no more new ideas to be had on the topic. And I have looked at
> several
Hello,
Hugo thanks for sharing your repo, I cloned the repo. Set the environment
variables GOOS and GOARCH and called mkall.sh in the unix directory.
The result is a generate:linux docker image and an _obj/_cgo_.o file in the
unix directory next to a number of go files.
So far this is as expecte
First, the caveat. I know error handling is a long-standing discussion. I
know there has been lots of debate on error handling, and it can seem like
there are no more new ideas to be had on the topic. And I have looked at
several/most of the most popular proposals, and there are quite a few t
maybe setting GODEBUG=http2debug=2 to spit out some logs?
On Monday, November 9, 2020 at 5:49:57 PM UTC+1 telyuk...@gmail.com wrote:
> Hello!
>
> I use third-party software with my own code to build reverse-proxy, which
> supports http/2. Sometimes requests hang up with infinite waiting. With
>
I know that you're asking about how to do this with the standard tools, but
you can do this with grep if you're on a platform that has the command
available:
grep --recursive --files-with-matches "//go:generate"
or, for short:
grep -rl "//go:generate"
This command will output a list of files wi
Hello!
I use third-party software with my own code to build reverse-proxy, which
supports http/2. Sometimes requests hang up with infinite waiting. With
Delve I found, that it happens in
https://golang.org/src/net/http/h2_bundle.go in writeHeaders or in
writeDataFromHandler. But I have no any
Hello,
is there a way to list all the files that have a `//go:generate` directive
with the standard tools?
I see that `go list` can show the ignored files so I am assuming it is
detecting `// +build ignore` directives, but I found nothing to lit the go
generate target files.
Thanks in advance
16 matches
Mail list logo