diff options
| author | Nikolaus Gotsche <n@softwarefools.com> | 2020-11-10 01:39:51 +0100 |
|---|---|---|
| committer | Nikolaus Gotsche <n@softwarefools.com> | 2020-11-10 01:39:51 +0100 |
| commit | c5d2c1c53952458a2cfeed08ab6e64dd18e43d16 (patch) | |
| tree | edd57493a56dacdcb3712220899f8832c7c68ea7 /config.go | |
| parent | fed5d18cb29f2b8158f479c8773534c317d3a55a (diff) | |
Diffstat (limited to 'config.go')
| -rw-r--r-- | config.go | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -31,6 +31,7 @@ type Config struct { Bankname string //`toml:"bankname"` Iban string //`toml:"iban"` Bic string //`toml:"bic"` + CSign string //`toml:"csign"` Ust float64 //`toml:"ust"` } @@ -89,7 +90,7 @@ func makeNewTOML(gibts bool) { n := "" file, err := homedir.Expand("~/.mywork.db") checkErr(err) - config = Config{file, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n,0.0} + config = Config{file, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n,0.0} } //fmt.Println("Whats Your Namecount\n") database := getNewInterInput("DB File Path: ", config.Database, nli) @@ -104,6 +105,7 @@ func makeNewTOML(gibts bool) { mobile := getNewInterInput("Mobile number: ", config.Mobile, nli) mail := getNewInterInput("Email: ", config.Mail, nli) url := getNewInterInput("URL: ", config.Url, nli) + curr := getNewInterInput("CurrencySymbol: ", config.CSign, nli) taxid := getNewInterInput("Tax ID: ", config.Taxid, nli) uid := getNewInterInput("UID: ", config.Uid, nli) var ust float64 @@ -111,8 +113,8 @@ func makeNewTOML(gibts bool) { uststr := getNewInterInput("USt %: ", fmt.Sprint(config.Ust), nli) ust, err = strconv.ParseFloat(uststr, 64) if err != nil { - //fmt.Println(nli,uststr, boldRed("can not be Parsed as a Float."), "Try a sh ape of X.X") - fmt.Println(nli,uststr, "can not be Parsed as a Float.", "Try a sh ape of X.X") + //fmt.Println(nli,uststr, boldRed("can not be Parsed as a Float."), "Try a shape of X.X") + fmt.Println(nli,uststr, "can not be Parsed as a Float.", "Try a shape of X.X") } else { break } @@ -123,7 +125,7 @@ func makeNewTOML(gibts bool) { iban := getNewInterInput("IBAN: ", config.Iban, nli) bic := getNewInterInput("BIC: ", config.Bic, nli) - conf := Config{database, folder, prefix, name, street, zip, city, country, telefon, mobile, mail, url, taxid, uid, bankacc, banklz, bankname, iban, bic, ust} + conf := Config{database, folder, prefix, name, street, zip, city, country, telefon, mobile, mail, url, taxid, uid, bankacc, banklz, bankname, iban, bic, curr, ust} buf := new(bytes.Buffer) err = toml.NewEncoder(buf).Encode(conf) |
