Re: [go-nuts] Shellquote in stdlib

2022-12-12 Thread Martin Atkins
I don't think the Go command is using a shell to parse the value of the -gcflags option. I believe that the syntax for this option is handled by an internal function called quoted.Split

Re: [go-nuts] Shellquote in stdlib

2022-11-23 Thread 'Christian Stewart' via golang-nuts
Hi Kurtis, On Wed, Nov 23, 2022, 4:57 PM Kurtis Rader wrote: > On Wed, Nov 23, 2022 at 7:33 AM Christian Stewart > wrote: > >> This is what I'm trying to accomplish: >> >> Start delve (dlv) with os/exec passing a set of []string os.Args as >> --build-flags >> >> Let's say I have this build argu

Re: [go-nuts] Shellquote in stdlib

2022-11-23 Thread Kurtis Rader
On Wed, Nov 23, 2022 at 7:33 AM Christian Stewart wrote: > This is what I'm trying to accomplish: > > Start delve (dlv) with os/exec passing a set of []string os.Args as > --build-flags > > Let's say I have this build arguments set: []string{"-gcflags", "-N -l"} > > - How can I pass this to --bu

Re: [go-nuts] Shellquote in stdlib

2022-11-23 Thread 'Christian Stewart' via golang-nuts
Kurtis, This is what I'm trying to accomplish: Start delve (dlv) with os/exec passing a set of []string os.Args as --build-flags Let's say I have this build arguments set: []string{"-gcflags", "-N -l"} - How can I pass this to --build-flags in Delve? strings.Join(flags, " ") is wrong. - How c

Re: [go-nuts] Shellquote in stdlib

2022-11-15 Thread Martin Atkins
Indeed, the rules for quoting and parsing command lines are considerably different even in different context on the same OS (Windows) and so successfully building a command line to be run requires detailed knowledge of the context in which it will be evaluated. Unix systems are at least relativ

Re: [go-nuts] Shellquote in stdlib

2022-11-06 Thread Kurtis Rader
On Sun, Nov 6, 2022 at 8:48 PM 'Christian Stewart' via golang-nuts < golang-nuts@googlegroups.com> wrote: > There have been several discussions about shellquote in go-nuts in the > past: > > https://github.com/kballard/go-shellquote > https://github.com/gonuts/go-shellquote > > I've found it neces

[go-nuts] Shellquote in stdlib

2022-11-06 Thread 'Christian Stewart' via golang-nuts
Hi all, There have been several discussions about shellquote in go-nuts in the past: https://github.com/kballard/go-shellquote https://github.com/gonuts/go-shellquote I've found it necessary to use both Split and Join in some cases when working with exec.Command. This seems like the type of th