it panics but its there
This commit is contained in:
20
config/new.go
Normal file
20
config/new.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"local/args"
|
||||
)
|
||||
|
||||
func New() error {
|
||||
as := args.NewArgSet()
|
||||
as.Append(args.STRING, "addr", "address to firefly iii", "192.168.0.86:9031")
|
||||
as.Append(args.STRING, "u", "username", "squeaky2x3@blapointe.com")
|
||||
as.Append(args.STRING, "p", "password", "fwees123")
|
||||
if err := as.Parse(); err != nil {
|
||||
return err
|
||||
}
|
||||
config = Config{}
|
||||
config.user = as.Get("u").GetString()
|
||||
config.pass = as.Get("p").GetString()
|
||||
config.addr = as.Get("addr").GetString()
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user