Re: [go-nuts] trouble passing an argument to a script

2019-02-26 Thread Pawel Zadrozny
Try to use absolute path to config file. import "filepath" configPath := filepath.Abs(filepath.Clean(*config)) cfg, err := ini.Load(configPath) On 26.02.2019 10:57, Natxo Asenjo wrote: hi, On Tuesday, February 26, 2019 at 10:51:28 AM UTC+1, Sebastien Binet wrote: from the compilat

Re: [go-nuts] trouble passing an argument to a script

2019-02-26 Thread Sebastien Binet
On Tue, Feb 26, 2019 at 2:09 PM Natxo Asenjo wrote: > > > On Tue, Feb 26, 2019 at 10:58 AM Natxo Asenjo > wrote: > >> >> hi, >> >> On Tuesday, February 26, 2019 at 10:51:28 AM UTC+1, Sebastien Binet wrote: >>> >>> from the compilation error, it would seem kingpin.Flag...ExistingFile() >>> return

Re: [go-nuts] trouble passing an argument to a script

2019-02-26 Thread Natxo Asenjo
On Tue, Feb 26, 2019 at 10:58 AM Natxo Asenjo wrote: > > hi, > > On Tuesday, February 26, 2019 at 10:51:28 AM UTC+1, Sebastien Binet wrote: >> >> from the compilation error, it would seem kingpin.Flag...ExistingFile() >> returns a *string, not a string. >> so these lines: >> fmt.Printf("%v, %s,

Re: [go-nuts] trouble passing an argument to a script

2019-02-26 Thread Natxo Asenjo
hi, On Tuesday, February 26, 2019 at 10:51:28 AM UTC+1, Sebastien Binet wrote: > > from the compilation error, it would seem kingpin.Flag...ExistingFile() > returns a *string, not a string. > so these lines: > fmt.Printf("%v, %s, %T\n", config, config, config) > cfg, err := ini.Load(config) >

Re: [go-nuts] trouble passing an argument to a script

2019-02-26 Thread Sebastien Binet
from the compilation error, it would seem kingpin.Flag...ExistingFile() returns a *string, not a string. so these lines: fmt.Printf("%v, %s, %T\n", config, config, config) cfg, err := ini.Load(config) should be replaced with: fmt.Printf("%v, %s, %T\n", *config, *config, *config) cfg, err := ini