Re: [go-nuts] How to try out the new range func CL in a module

2023-08-27 Thread Hein Meling
transparently download different versions. If >> I remove that, I can indeed reproduce the behavior you are seeing. >> So, my recommendation for experimenting would be to run `go env -w >> GOTOOLCHAIN=local`. >> >> On Tue, Aug 22, 2023 at 12:51 AM Hein Meling wrote:

Re: [go-nuts] How to try out the new range func CL in a module

2023-08-21 Thread Hein Meling
eld func(T) bool) bool { > for _, v := range s { > if !yield(v) { > return false > } > } > return true > } > } > mero@vetinari ~/tmp/x$ gotip run x.go > 1 > 2 > 3 > > On Fri, Aug 18, 2023 at 10:54 PM

[go-nuts] How to try out the new range func CL in a module

2023-08-18 Thread Hein Meling
Hi all, I wanted to play around with the new range func CL . Doing simple stuff works just fine, but if I need to import packages to construct my custom iterator func, the go/gotip command insists on a go.mod file, which effectively resets the go

[go-nuts] Re: grpc and golang struct tags

2021-11-29 Thread Hein Meling
I’ve used protopatch successfully to solve similar problems. Cheers, :) Hein On Saturday, November 27, 2021 at 4:53:06 PM UTC+1 Sankar wrote: > Hi > > I have a database that has a column `2xxCode`. This database is part of a > legacy system and I cannot

[go-nuts] Re: New site go.dev is awful

2021-11-24 Thread Hein Meling
I also don’t like it very much… it is just too noisy. But I haven’t spent enough time with it to really make a note of concrete issues. :) Hein On Tuesday, November 23, 2021 at 7:46:19 PM UTC+1 poe...@gmail.com wrote: > Am I the only one who thinks this? The old site golang.org had a simple >

[go-nuts] Re: Generics - please provide real life problems

2020-12-28 Thread Hein Meling
Here is another example. I haven’t worked out the details yet, but I envision that I can avoid generating this QuorumSpec interface in our Gorums framework: https://github.com/relab/gorums/blob/master/cmd/protoc-gen-gorums/dev/zorums_qspec_gorums.pb.go And instead use generics... I hope that

[go-nuts] How to use "go/build".ImportDir to get Package struct?

2020-09-17 Thread Hein Meling
Hi all, I'm trying to get info about the package, but the code below returns an empty build.Package struct... Anyone know how to use this API to get a populated Package struct? p, err := build.ImportDir("../paging", build.FindOnly) if err != nil { t.Error(err) } fmt.Println(p) Thanks, :)

Re: [go-nuts] Generics and parentheses

2020-07-15 Thread Hein Meling
Correction: I think it is much more important that Go remains internally consistent in its use of "square" brackets. On Wednesday, July 15, 2020 at 8:54:58 PM UTC+2 Hein Meling wrote: > When you refer to beginners, I think you mean developers from other > lang

Re: [go-nuts] Generics and parentheses

2020-07-15 Thread Hein Meling
When you refer to beginners, I think you mean developers from other languages (Java/C#/C++...) that already know the concept of generics. I don't think they will have problems adapting to a square brackets notation... they are smart people, and after all they have to learn many other

[go-nuts] Re: godoc (golang.org/x/tools/cmd/godoc) has become module-aware

2020-04-11 Thread Hein Meling
Maybe the godoc command got installed in your $HOME/go/bin folder and this folder is not in your $PATH? -- 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

Re: [go-nuts] Multi-module repository and invalid version: unknown revision

2020-03-29 Thread Hein Meling
That might actually explain it... Thanks for the tip. After updating the dependency, it is working again. Thanks, :) Hein On Sunday, March 29, 2020 at 10:35:15 PM UTC+2, Jakob Borg wrote: > > On 29 Mar 2020, at 18:00, Hein Meling > > wrote: > > > github.com/autog

[go-nuts] Multi-module repository and invalid version: unknown revision

2020-03-29 Thread Hein Meling
Hi all, First off, I've read this, and the other FAQ answers: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository However, I'm not sure how my case fits the scenarios described therein; or maybe I just don't understand how it is related.

Re: [go-nuts] Introspecting a type

2017-11-23 Thread Hein Meling
tion. This can be as simple as > > type Concurrent []Operation > > func (c Concurrent) Operations() []Operation { > return c > } > > Make your top level thing an []Operator. Use type switching or further > interface methods as appropriate. > > //jb > > On 23 Nov 20

[go-nuts] Introspecting a type

2017-11-22 Thread Hein Meling
I have code like this: type TestCase struct { Namestring Description string OrderOp [][]Operation } type Concurrent []Operation type Sequential []Operation With the intent to do things like this: OrderOp: [][]Operation{ Concurrent{ {ID: "A", Name: "Read", ArgumentType: "ReadRequest",

[go-nuts] Variable scope for text/template

2017-10-05 Thread Hein Meling
Hi all, Please see linked example code. I've been trying set a "global" variable ($LastName in the example) for use inside a named template (phony in the example), but the scoping rules for the template packages does not follow common scoping rules typically used in other languages, including

[go-nuts] Intel SGX from Go anyone?

2017-09-06 Thread Hein Meling
Hello everybody, I'm interested in testing out Intel SGX for a few projects, and since Go is my language of choice, I tried to google to see if anyone has done language bindings using cgo for interaction with SGX on Linux or something along those lines. I found nothing for Go, but found