Re: [go-nuts] Modules and internal packages

2021-03-03 Thread 'Axel Wagner' via golang-nuts
On Thu, Mar 4, 2021 at 12:55 AM Michael Ellis wrote: > Thanks even though it's not the answer I was hoping for. Seems to me that > since the Go Authors have accorded special status to directories named > "internal" the module mechanism should recognize references to it and not > require a

Re: [go-nuts] Incompatibility of reflection libraries (reflect versus go-reflect), on json-iterator (Go 1.15.8)

2021-03-03 Thread Sokolov Yura
I use reflect2 in our custom more robust deepcopy implementation in two places: 1. When I need to grow slice. Standard reflect package has no way to enlarge slice without call to reflect.MakeSlice, which allocates unneeded slice header. 2. When I need to iterate map. Using standard reflect

Re: [go-nuts] Modules and internal packages

2021-03-03 Thread 'Bryan C. Mills' via golang-nuts
You should be able to use a `replace` directive to replace the full path "github.com/Michael-F-Ellis/skeleton/internal/common" or similar. If you take that approach, the skeleton module itself *must not* contain that package, or else the `import` statements that refer to that package would be

Re: [go-nuts] Modules and internal packages

2021-03-03 Thread Michael Ellis
On Wednesday, March 3, 2021 at 6:11:38 PM UTC-5 axel.wa...@googlemail.com wrote: > On Thu, Mar 4, 2021 at 12:02 AM Michael Ellis > wrote: > >> What's the right way to handle this use case? >> > > I think the right way to handle it is to modify the file. In the final > code, the import path

Re: [go-nuts] Modules and internal packages

2021-03-03 Thread 'Axel Wagner' via golang-nuts
On Thu, Mar 4, 2021 at 12:02 AM Michael Ellis wrote: > What's the right way to handle this use case? > I think the right way to handle it is to modify the file. In the final code, the import path should unambiguously point to where the code can be found - regardless of whether it was using your

[go-nuts] Modules and internal packages

2021-03-03 Thread Michael Ellis
I recently coded up a skeleton app to use as a starting point for projects that include a server component and a wasm (WebAssembly) client that does local work in a user's browser while communicating with the server. The skeleton is hosted on Github (in a private repo until I think it's

[go-nuts] Issuing a blocking system call

2021-03-03 Thread Florian Weimer
Do I have to tell the runtime that a system call is blocking? For example, I use this code snippet to perform a blocking ioctl: conn, err := file.SyscallConn() if err != nil { return } err1 := conn.Control(func(fd uintptr) { _, _,

[go-nuts] Re: Disable the module checksum and proxy

2021-03-03 Thread LastName Almaember
Thank you for helping! BTW I'm the other person but I couldn't reply from my Protonmail account. On Wednesday, March 3, 2021 at 3:05:48 PM UTC+1 Brian Candler wrote: > "The go command's download behavior may be configured using GOPROXY, > GOSUMDB, GOPRIVATE, and other environment variables.

[go-nuts] Added polish translation of Tour of Go

2021-03-03 Thread Michael
Hi! I've been recently working on a translation of "A Tour of Go" to Polish language and wanted to let you know that I have a PR ready! Kind regards Michal Stokluska -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this

[go-nuts] How do you get an update for the tip of a package?

2021-03-03 Thread Peter Kleiweg
I try to install a Go program from github at tip. This works: go get github.com/some/program@HEAD But when there is a new push to the repository, and I do this: go get -u github.com/some/program@HEAD ... I still have the previous version. The same with go install. The same when I

[go-nuts] Re: Disable the module checksum and proxy

2021-03-03 Thread Brian Candler
"The go command's download behavior may be configured using GOPROXY, GOSUMDB, GOPRIVATE, and other environment variables. See 'go help environment' and https://golang.org/ref/mod#private-module-privacy for more information." "GOPROXY: URL of Go module proxy. See

[go-nuts] Disable the module checksum and proxy

2021-03-03 Thread 'almaember' via golang-nuts
Hello golang-nuts! Apparently, Golan 1.13 introduced a module proxy for the Go CLI. I know that by default this points to "proxy.golang.org". This is fine for me right now, but I wanted to ask what the way to disable (that is, make the CLI request the module directly from the VCS server), or

[go-nuts] Re: Go modules: why no_version != latest ?

2021-03-03 Thread Volker Dobler
On Wednesday, 3 March 2021 at 08:35:49 UTC+1 rolf...@gmail.com wrote: > In my not painless transition from GOPATH to modules, I would like to > understand why import paths without a version are not equal to 'latest', > which is what happens in many other contexts: no version specified, use >