Ahm. Very subtle. Changed it to
bin := "" bin, err = exec.LookPath(os.Args[0]) if err == nil { wd = filepath.Dir(bin) } thanks for the feedback! Le dimanche 26 juin 2016 00:00:51 UTC+2, Jan Mercl a écrit : > > On Sat, Jun 25, 2016 at 11:19 PM mhhcbon <cpasmabo...@gmail.com > <javascript:>> wrote: > > > bin, err := exec.LookPath(os.Args[0]) > > Note that this err variable is shadowing the one declared previously. > > -- > > -j > -- 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. For more options, visit https://groups.google.com/d/optout.