Re: [go-nuts] Re: Recommended way to distribute pre-compiled C-dependencies for modules using CGO ?

2023-10-16 Thread Justin Israel
On Tuesday, October 17, 2023 at 10:40:33 AM UTC+13 Marc-Antoine Ruel wrote: I second Richard's suggestion. I used the same trick for https://github.com/periph/d2xx. This git repository contains a minimalist shim for the .a libraries and nothing else. It's designed to compile on any platform.

Re: [go-nuts] Re: Recommended way to distribute pre-compiled C-dependencies for modules using CGO ?

2023-10-16 Thread Marc-Antoine Ruel
I second Richard's suggestion. I used the same trick for https://github.com/periph/d2xx. This git repository contains a minimalist shim for the .a libraries and nothing else. It's designed to compile on any platform. It falls back to a scaffolding if the corresponding .a library is not present for

[go-nuts] Re: go list fails, how do I clear "-mod=readonly"

2023-10-16 Thread Jason Phillips
I believe the fixes have already been released. Go 1.21 was released in August and there have been 5 point releases to 1.20 since your version (1.20.5) was released. Have you tried updating your Go toolchain? On Monday, October 16, 2023 at 4:21:11 PM UTC-4 Pat Farrell wrote: > yes that is it.

[go-nuts] Re: go list fails, how do I clear "-mod=readonly"

2023-10-16 Thread Pat Farrell
yes that is it. I see that there is a patch that will be in the next release. Anyone know of a workaround until then? thanks -- 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,

Re: [go-nuts] Re: Recommended way to distribute pre-compiled C-dependencies for modules using CGO ?

2023-10-16 Thread Mike Schinkel
Hi Jan, I'm going to go out on a limb here and suggest looking at using Go's `embed` feature? https://blog.jetbrains.com/go/2021/06/09/how-to-use-go-embed-in-go-1-16/ I have not tried it with C libraries so there may be numerous reasons why it may not work for your needs. For example, I do

[go-nuts] Re: go list fails, how do I clear "-mod=readonly"

2023-10-16 Thread TheDiveO
looks like https://stackoverflow.com/questions/76495283/go-list-command-prints-hint-i-dont-understand On Monday, October 16, 2023 at 7:25:46 PM UTC+2 Pat Farrell wrote: > On Monday, October 16, 2023 at 1:22:42 PM UTC-4 TheDiveO wrote: > > go mod tidy > > > I've done that, and while it just

[go-nuts] Re: go list fails, how do I clear "-mod=readonly"

2023-10-16 Thread Pat Farrell
On Monday, October 16, 2023 at 1:22:42 PM UTC-4 TheDiveO wrote: go mod tidy I've done that, and while it just executes quietly, I don't see how that addresses the issue that 'go list' fails to show me modules that have been updated. thanks pat -- You received this message because you are

[go-nuts] Re: go list fails, how do I clear "-mod=readonly"

2023-10-16 Thread TheDiveO
go mod tidy On Monday, October 16, 2023 at 7:20:13 PM UTC+2 Pat Farrell wrote: > i'm running > go version go1.20.5 linux/amd64 > > when I attempt to run 'go list' to find any updated to dependant > modules, it fails. > > go list -m -u all > go: updates to go.sum needed, disabled by

[go-nuts] go list fails, how do I clear "-mod=readonly"

2023-10-16 Thread Pat Farrell
i'm running go version go1.20.5 linux/amd64 when I attempt to run 'go list' to find any updated to dependant modules, it fails. go list -m -u all go: updates to go.sum needed, disabled by -mod=readonly I've checked, and my go.mod and go.sum files are 777 -rwxrwxrwx 1 pfarrell pfarrell 408

Re: [go-nuts] ResponseRecorder HTTP status code defaults to 200

2023-10-16 Thread 'Axel Wagner' via golang-nuts
To be clear: The behavior of an `http.ResponseWriter` to implicitly use a 200 status code if no explicit WriteHeader call is made is documented: https://pkg.go.dev/net/http#ResponseWriter.WriteHeader I really think it is a bad (or at least strange) idea to claim to implement `http.ResponseWriter`

Re: [go-nuts] ResponseRecorder HTTP status code defaults to 200

2023-10-16 Thread 'Axel Wagner' via golang-nuts
It seems to me that the fact that the functions accept and return types from `net/http` (like `http.ResponseWriter` and `http.Handler`) and given that it's nested below `net/http` should make it fairly obvious that it's meant to be used with `net/http`. I also genuinely don't understand what the

Re: [go-nuts] Re: Recommended way to distribute pre-compiled C-dependencies for modules using CGO ?

2023-10-16 Thread Bruno Albuquerque
I guess you switched things here. Shared libraries (.so) need to be available at engine. Static libraries (.a) are bagged into the binary. -Bruno On Sun, Oct 15, 2023, 3:55 PM Jan wrote: > Thanks Tamas, this is useful information. > > One of my libraries is using a `.a` library -- as opposed

Re: [go-nuts] ResponseRecorder HTTP status code defaults to 200

2023-10-16 Thread Simon Walter
Axel, thanks for providing some context. I suppose it is better for me to think of the httptest package as specific to the http package - although this is not explicitly stated: "Package httptest provides utilities for HTTP testing" This seems misleading as is the case with this '200'