[go-nuts] 1.13.4: go mod: weird permissions in pkg/mod after go get

2019-11-22 Thread Sean Liao
The module cache GOPATH/pkg/mod has no write permissions to prevent accident modifications to the files (they are versioned and checksummed, modifying them would fail the checksum). -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To

[go-nuts] Re: Golang Issue reading/writing Windows Defender Registry

2019-11-22 Thread Kyhle Ohlinger
I really don't know, I'm currently using: OS Name: Microsoft Windows 10 Enterprise OS Version:10.0.18362 N/A Build 18362 On Friday, November 22, 2019 at 9:50:17 PM UTC+4, JuciÊ Andrade wrote: > > Microsoft Windows [Version 10.0.18362.476] > -- You received

Re: [go-nuts] no returned name or package path from reflect.Type?

2019-11-22 Thread Dan Kortschak
Thanks. That continues to trip me up. On Fri, 2019-11-22 at 17:01 -0800, Ian Lance Taylor wrote: > On Fri, Nov 22, 2019 at 1:06 PM Dan Kortschak > wrote: > > > > Are reflect.Type.PkgPath/Name supposed to return strings for > > defined > > types? There's nothing in the documentation that says

Re: [go-nuts] no returned name or package path from reflect.Type?

2019-11-22 Thread Dan Kortschak
Solved. Because they are not named types (being the pointer to the type). On Sat, 2019-11-23 at 07:36 +1030, Dan Kortschak wrote: > Are reflect.Type.PkgPath/Name supposed to return strings for defined > types? There's nothing in the documentation that says they don't. > > But

Re: [go-nuts] no returned name or package path from reflect.Type?

2019-11-22 Thread Ian Lance Taylor
On Fri, Nov 22, 2019 at 1:06 PM Dan Kortschak wrote: > > Are reflect.Type.PkgPath/Name supposed to return strings for defined > types? There's nothing in the documentation that says they don't. > > But https://play.golang.org/p/8Jede-mimtA and > https://play.golang.org/p/LT5m6yz0P5Y don't show

[go-nuts] Re: About Libraries Versioning

2019-11-22 Thread Eyal
Summaries my conclusions on this journey: https://posener.github.io/branch-strategy/ Enjoy! On Wednesday, November 20, 2019 at 3:42:11 PM UTC+2, Eyal wrote: > > Hi > > The recommended way to create a > new version for a go library is by copying the

[go-nuts] no returned name or package path from reflect.Type?

2019-11-22 Thread Dan Kortschak
Are reflect.Type.PkgPath/Name supposed to return strings for defined types? There's nothing in the documentation that says they don't. But https://play.golang.org/p/8Jede-mimtA and https://play.golang.org/p/LT5m6yz0P5Y don't show any output where I would expect them to. Dan -- You received

[go-nuts] 1.13.4: x/go/loader: prevent update of the go.mod file ?

2019-11-22 Thread clement auger
hi, I have met another issue with go.mod and x/go/loader. It looks like when it loads, it updates the go.mod in cwd in this example i create a new conf to load tpl package, it results in running the loader in cwd, because I call for Import(), it updates the go.mod and the programmatically

[go-nuts] 1.13.4: go mod: weird permissions in pkg/mod after go get

2019-11-22 Thread clement auger
hi, I have some weird permissions set on my module files after i run go get on my project. please check my session [clementauger@Host-001 jenjen-stream] $ go version go version go1.13.4 linux/amd64 [clementauger@Host-001 jenjen-stream] $ go env GO111MODULE="" GOARCH="amd64" GOBIN=""

[go-nuts] Re: Golang Issue reading/writing Windows Defender Registry

2019-11-22 Thread JuciÊ Andrade
Microsoft Windows [Version 10.0.18362.476] -- 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

[go-nuts] Re: Golang Issue reading/writing Windows Defender Registry

2019-11-22 Thread JuciÊ Andrade
Hi, Kyhle. I don't know if that is good news for you, but in my computer your Go code works exactly as you expect. Output: Value: C:\ProgramData\Microsoft\Windows Defender\platform\4.18.1909.6-0 $ go version go version go1.13.4 windows/amd64 -- You received this message because you are

[go-nuts] Re: Enforce immutability through static analysis

2019-11-22 Thread Jake Montgomery
I'm afraid your question is a bit confusing, which may account for some of the responses you have received so far. Here is what I think you are asking for. You want to define an interface which *your *package will use, and *other *packages will implement. You want to put restrictions on what

Re: [go-nuts] Enforce immutability through static analysis

2019-11-22 Thread Paul Jolly
May or may not be of interest, but I experimented with an alternative approach in https://github.com/myitcv/x/blob/master/immutable/_doc/immutableGen.md Although this is where the term "immutable" gets massively overloaded, because the result of immutableGen is (as I understand it) persistent

Re: [go-nuts] Enforce immutability through static analysis

2019-11-22 Thread Robert Engels
I don't think anyone was mocking the question or thought it was ridiculous.-Original Message- From: Robert Johnstone Sent: Nov 22, 2019 8:40 AM To: golang-nuts Subject: Re: [go-nuts] Enforce immutability through static analysis This comment is a little unfair.  There was at one time

Re: [go-nuts] Enforce immutability through static analysis

2019-11-22 Thread Robert Johnstone
This comment is a little unfair. There was at one time efforts to allow const as part of the type system. I believe that the specific motivation was to allow []const byte to ease conversions are eliminate conversions from strings. The current duplication of bytes and strings packages is a

Re: [go-nuts] Enforce immutability through static analysis

2019-11-22 Thread Ad van der Veer
Thank you for the responses! I understand that i'm trying to do something that the language doesn't really support, and that is fine; i'm a huge advocate of Go so i'm not trying to point out language weaknesses. In my i'm dictating the interface{} that the user should implement to allow its