Re: [go-nuts] Why can't I concationate two slices of an interface and implemetation?

2024-06-18 Thread Ian Lance Taylor
On Tue, Jun 18, 2024 at 5:43 PM Ian Spence wrote: > > I've encountered a limitation and I'd like to understand what's going on and > why it's not working the way I would expect. > > If I have a slice of an interface type, and another slice of a type that > implements that interface, I cannot con

[go-nuts] Why can't I concationate two slices of an interface and implemetation?

2024-06-18 Thread Ian Spence
Hi all! I've encountered a limitation and I'd like to understand what's going on and why it's not working the way I would expect. If I have a slice of an interface type, and another slice of a type that implements that interface, I cannot concat these slices together using append - but I can a

Re: [go-nuts] Modules 'replace' directive

2024-06-18 Thread Stephen Illingworth
On Tuesday 18 June 2024 at 19:33:28 UTC+1 Marcin Romaszewicz wrote: One of your dependencies could, in turn, have a dependency on that third party project. Run "go mod graph" to see what imports what and you should be able to track it down. I thought about that but there's no reference to anyt

Re: [go-nuts] Modules 'replace' directive

2024-06-18 Thread Marcin Romaszewicz
One of your dependencies could, in turn, have a dependency on that third party project. Run "go mod graph" to see what imports what and you should be able to track it down. As for the replace directive, I've always viewed it as a temporary quick fix. In your own code, you can simply replace the mo

Re: [go-nuts] go clean -h isn't helpful

2024-06-18 Thread Ian Lance Taylor
On Mon, Jun 17, 2024 at 10:52 PM Will Faught wrote: > > > People who already know what the command does can use that short summary to > > remind themselves of the available options. > > Which options do you mean? My point was that it doesn't document any options. Oh, sorry, I see what you mean.

Re: [go-nuts] strip / reduce module compile size

2024-06-18 Thread Zxilly Chou
Please try https://github.com/Zxilly/go-size-analyzer . I created this based on reverse engineering, so only the bytes in the final build will be count. 在2024年6月18日星期二 UTC+8 01:14:09 写道: > Are there other tools that may show the final size? I'd like to see if > there are more aggressive flags

Re: [go-nuts] Re: Breaking an io.Pipe loop

2024-06-18 Thread Harri L
I pointed out that maybe exec.Cmd.StdinPipe and exec.Cmd.StdoutPipe would be better. Here’s the *modified* sample from this thread and the complete program for easier copying to play with—no deadlock with this. func main() { defer err2.Catch() cmdName := "/bin/bash" cmdArgs := []string{ "-c", "

[go-nuts] Modules 'replace' directive

2024-06-18 Thread Stephen Illingworth
Hello, What's the correct way to do the following: I'm using a third-party Go module which is no longer under development. I've forked the project in order to apply some patches of my own. I want to use the new version of the module in my project. The following has been added to the go.mod fil