If you only need to target 1.18+, you can use `debug/buildinfo.ReadFile` which doesn't require shelling out to go
On Fri, Apr 15, 2022 at 7:03 AM Zhaoxun Yan <yan.zhao...@gmail.com> wrote: > That sounds great! Thanks. > > 在2022年4月15日星期五 UTC+8 05:55:27<kortschak> 写道: > >> On Thu, 2022-04-14 at 03:05 -0700, Michel Casabianca wrote: >> > Any comment and contribution welcome. >> >> Can I suggest that you use golang.org/x/sys/execabs rather than os/exec >> in ExecCommand? >> >> >> -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/454f35cf-6599-4fc1-9dd2-602137d58cb6n%40googlegroups.com > <https://groups.google.com/d/msgid/golang-nuts/454f35cf-6599-4fc1-9dd2-602137d58cb6n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAGabyPpo-HZgSLDNFU_fTrj%2BoMpCj2ePcUQWK3sGkFX_BZfG8w%40mail.gmail.com.