[go-nuts] Using client-go to access a specific context, not current context

2024-02-25 Thread David Karr
I'm relatively new to golang, although I'm pretty familiar with Kubernetes. I want to see if I can use client-go as a framework for a set of scripts that get (or set) information on a specific cluster. I don't want to use the current context, I want to set the context name on the command

Re: [go-nuts] How to have a raw parameter value in cobra?

2024-02-25 Thread David Karr
Ok, that worked. I had tried that before, but I had done it wrong. On Sunday, February 25, 2024 at 1:04:10 PM UTC-8 burak serdar wrote: > Somewhere in your main, you should be calling rootCmd.Execute(). Instead: > > func main() { > // first, make sure there are at least 2 args. Then, process the

Re: [go-nuts] How to have a raw parameter value in cobra?

2024-02-25 Thread burak serdar
Somewhere in your main, you should be calling rootCmd.Execute(). Instead: func main() { // first, make sure there are at least 2 args. Then, process the 1st parameter // Then rootCmd.SetArgs(os.Args[2:]) rootCmd.Execute() } On Sun, Feb 25, 2024 at 1:50 PM David Karr wrote: > > But

[go-nuts] Re: Equality of interface of an empty struct - why?

2024-02-25 Thread tapi...@gmail.com
Absolutely a bug. On Thursday, February 22, 2024 at 6:55:49 PM UTC+8 Brien Colwell wrote: > I'm confused by this output. It appears that the interface of two > different pointers to an empty struct are equal. In all other cases, > interface equality seems to be the pointer equality. What's

[go-nuts] Re: Equality of interface of an empty struct - why?

2024-02-25 Thread tapi...@gmail.com
The behavior of Go 1.9 or 1.10 is even more weird. They make the following code print false. ;D package main type T struct {} func main() { var a, b = {}, {} println(a == b || a != b) } On Sunday, February 25, 2024 at 4:30:22 PM UTC+8 tapi...@gmail.com wrote: > Absolutely a bug. > > On

Re: [go-nuts] How to have a raw parameter value in cobra?

2024-02-25 Thread David Karr
But where would that be done? I'm not certain of the exact role of the "rootCmd.Execute()" function, or the optional "Run" function in the Command object. Neither of those appear to be executed, when I just run " You can do rootCmd.SetArgs(os.Args[2:]), and process the first > parameter

[go-nuts] How to have a raw parameter value in cobra?

2024-02-25 Thread David Karr
I am not a new programmer, but I am pretty new to golang, having only written a couple of small applications, and that was several months ago. I'm trying to construct an application using Cobra, using some nonstandard conventions. Is it better to ask a question like this in an issue in the

Re: [go-nuts] How to have a raw parameter value in cobra?

2024-02-25 Thread burak serdar
You can do rootCmd.SetArgs(os.Args[2:]), and process the first parameter yourself. On Sun, Feb 25, 2024 at 11:43 AM David Karr wrote: > > I am not a new programmer, but I am pretty new to golang, having only written > a couple of small applications, and that was several months ago. I'm trying

[go-nuts] [gollvm] Are there any plans to sync with LLVM16 or above?

2024-02-25 Thread sophie zhao
Hello, We want to add support for the loongarch architecture to gollvm, which requires using an LLVM version that supports loongarch (that is, a version >= 16.0.0). The current gollvm only syncs with LLVM trunk at 09629215c272. We did some work synchronizing LLVM locally, but it wasn't enough.