Re: [go-nuts] Escape special shell characters when using os.Getenv

2016-09-25 Thread Matt Harden
This also works: https://play.golang.org/p/JOJ7WLIUY3 On Sun, Sep 25, 2016 at 3:53 PM Matt Harden wrote: > There is no escaping mechanism built in to os.Expand. > > One workaround would be to define an environment variable containing a > dollar sign: https://play.golang.org/p/InJx2_EWB2 > Anothe

Re: [go-nuts] Escape special shell characters when using os.Getenv

2016-09-25 Thread Matt Harden
There is no escaping mechanism built in to os.Expand. One workaround would be to define an environment variable containing a dollar sign: https://play.golang.org/p/InJx2_EWB2 Another is to substitute an unused character or string and replace it after expansion: https://play.golang.org/p/j8Oa3dgdoH