summaryrefslogtreecommitdiff
path: root/config.go
diff options
context:
space:
mode:
authorNikolaus Gotsche <n@softwarefools.com>2019-03-31 03:13:58 +0200
committerNikolaus Gotsche <n@softwarefools.com>2019-03-31 03:13:58 +0200
commit29539d25c1bc60db1f0745b969c8a9692eee27a7 (patch)
tree4502a040ef11618f57036f204848c8354ce215a1 /config.go
parent0b97a731b9f38f7d98bd9331453aae918953b26d (diff)
Prefix of Invoice Files
Diffstat (limited to 'config.go')
-rw-r--r--config.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/config.go b/config.go
index 734983d..944bd45 100644
--- a/config.go
+++ b/config.go
@@ -14,6 +14,7 @@ import (
type Config struct {
Database string //`toml:"database"`
Folder string //`toml:"folder"`
+ Prefix string //`toml:"prefix"`
Name string //`toml:"name"`
Street string //`toml:"street"`
Zip string //`toml:"zip"`
@@ -86,11 +87,12 @@ 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}
+ config = Config{file, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n}
}
//fmt.Println("Whats Your Namecount\n")
database := getNewInterInput("DB File Path: ", config.Database, nli)
folder := getNewInterInput("Template Folder: ", config.Folder, nli)
+ prefix := getNewInterInput("Invoice File Prefix: ", config.Prefix, nli)
name := getNewInterInput("Whats your Name?: ", config.Name, nli)
street := getNewInterInput("Street: ", config.Street, nli)
zip := getNewInterInput("Zip Code: ", config.Zip, nli)
@@ -107,7 +109,7 @@ func makeNewTOML(gibts bool) {
iban := getNewInterInput("IBAN: ", config.Iban, nli)
bic := getNewInterInput("BIC: ", config.Bic, nli)
- conf := Config{database, folder, name, street, zip, city, country, telefon, mobile, mail, url, taxid, bankacc, banklz, bankname, iban, bic}
+ conf := Config{database, folder, prefix, name, street, zip, city, country, telefon, mobile, mail, url, taxid, bankacc, banklz, bankname, iban, bic}
buf := new(bytes.Buffer)
err = toml.NewEncoder(buf).Encode(conf)