[go-nuts] Re: replacement for filepath.HasPrefix?

2024-05-21 Thread Jason E. Aten
When I needed to follow symlinks and exclude application-specific directories, I ended up copying and customizing Walk() and walk() from the filepath package. They are short and it was a straightforward to adapt them to my needs.

[go-nuts] Re: Uses of reflect and unsafe packages

2024-05-21 Thread Jason E. Aten
I use "unsafe" for performance optimization and with Cgo[1][2][3]. I use "reflect" and "unsafe" for doing de-serialization in a serialization framework, and for cross-language work (Go <-> C, Go <-> scripting languages like Python, R, Lua, zygomys)[4][5][6]. If you are staying entirely

Re: [go-nuts] Calling the .net dlls to the golang

2024-05-21 Thread peterGo
Kurtis Rader, The OP's question: "I am new to Golang. I have the.net dlls, and I am trying to call the.net function in the dll in Golang. but its not working and i searching in the Google also i could not find the relavent information, please me out here and provide the sample program also"

Re: [go-nuts] Calling the .net dlls to the golang

2024-05-21 Thread peterGo
Kurtis Rader, Please follow the Go Community Code of Conduct while posting here. In short: - Treat everyone with respect and kindness. - Be thoughtful in how you communicate. - Don’t be destructive or inflammatory. - You are fired from your

Re: [go-nuts] Calling the .net dlls to the golang

2024-05-21 Thread Kurtis Rader
Since the question is incoherent and the link to the package you claim to be using doesn't resolve to a valid host name I'm going to assume this is spam and you're not really a person asking for help. P.S., Saying it "is not working" is meaningless. If you are a real person asking for help show

[go-nuts] Re: vet: Respect PATH

2024-05-21 Thread andrew.p...@gmail.com
Same request for goimports. func GoImports(args ...string) error { mg.Deps(CollectGoFiles) for pth := range CollectedGoFiles { cmd := exec.Command("goimports") cmd.Args = append(cmd.Args, args...) cmd.Args = append(cmd.Args, pth) cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr if err :=

[go-nuts] Re: vet: Respect PATH

2024-05-21 Thread andrew.p...@gmail.com
Similar request for gofmt. It should accept the ordinary ./... Go project recursion syntax, instead of the awkward, explicit: func GoFmt(args ...string) error { mg.Deps(CollectGoFiles) for pth := range CollectedGoFiles { cmd := exec.Command("gofmt") cmd.Args = append(cmd.Args, args...) cmd.Args

Re: [go-nuts] Discover go-size-analyzer: Streamline Your Go Binary Insights

2024-05-21 Thread Luca Pascali
Nice PSK On Tue, May 21, 2024 at 5:17 PM Zxilly Chou wrote: > Hello go-nuts, > > I'm excited to share a new tool that has landed in our Go ecosystem: > go-size-analyzer. This utility is designed to give you a clear picture of > the size of your compiled Go binaries, with a focus on how

[go-nuts] vet: Respect PATH

2024-05-21 Thread andrew.p...@gmail.com
go vet fails to obey the standard PATH environment variable (POSIX, Windows). This makes it unnecessarily cumbersome to use go vet. Here is an example (Mage) script to scan Go projects for variable shadowing: func GoVetShadow(args ...string) error { shadowPath, err := exec.LookPath("shadow")

[go-nuts] Discover go-size-analyzer: Streamline Your Go Binary Insights

2024-05-21 Thread Zxilly Chou
Hello go-nuts, I'm excited to share a new tool that has landed in our Go ecosystem: go-size-analyzer. This utility is designed to give you a clear picture of the size of your compiled Go binaries, with a focus on how dependencies contribute to the overall footprint. It simplifies the

[go-nuts] Uses of reflect and unsafe packages

2024-05-21 Thread Ketan Rathod
I have seen many discussions using refflect and unsafe packages, so i am curious to know their usecases and when it is useful to use this packages. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop

[go-nuts] Calling the .net dlls to the golang

2024-05-21 Thread Pavan Kumar A R
Hello , I am new to Golang. I have the.net dlls, and I am trying to call the.net function in the dll in Golang. but its not working and i searching in the Google also i could not find the relavent information, please me out here and provide the sample program also Thanks for the advance. --