Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
0c9fbb584e | |||
59fa2ca1ee |
5
.gitignore
vendored
5
.gitignore
vendored
@ -24,5 +24,8 @@ _testmain.go
|
|||||||
*.test
|
*.test
|
||||||
*.prof
|
*.prof
|
||||||
|
|
||||||
# Ignore the binary
|
# Ignore the binaries
|
||||||
gime
|
gime
|
||||||
|
gime.darwin64*
|
||||||
|
gime.linux64*
|
||||||
|
gime.win64.exe*
|
||||||
|
8
main.go
8
main.go
@ -14,7 +14,7 @@ import (
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
AppName = "gime"
|
AppName = "gime"
|
||||||
AppVersion = 1
|
AppVersion = 1.1
|
||||||
DefDBName = "gime.db"
|
DefDBName = "gime.db"
|
||||||
DefArchDBName = "gimearch.db"
|
DefArchDBName = "gimearch.db"
|
||||||
DefRoundTo = "1m0s"
|
DefRoundTo = "1m0s"
|
||||||
@ -83,7 +83,7 @@ func cmdDoConfig(args []string) int {
|
|||||||
conf = strings.TrimSpace(conf)
|
conf = strings.TrimSpace(conf)
|
||||||
if conf == "Y" {
|
if conf == "Y" {
|
||||||
fmt.Println("Resetting Configuration...")
|
fmt.Println("Resetting Configuration...")
|
||||||
cfg.Set("dbdir", cfg.GetConfigPath()+"/")
|
cfg.Set("dbdir", cfg.GetConfigPath()+string(os.PathSeparator))
|
||||||
cfg.Set("dbname", DefDBName)
|
cfg.Set("dbname", DefDBName)
|
||||||
cfg.Set("dbarchname", DefArchDBName)
|
cfg.Set("dbarchname", DefArchDBName)
|
||||||
cfg.Set("roundto", DefRoundTo)
|
cfg.Set("roundto", DefRoundTo)
|
||||||
@ -107,8 +107,8 @@ func cmdDoConfig(args []string) int {
|
|||||||
switch pts[0] {
|
switch pts[0] {
|
||||||
case "dbdir":
|
case "dbdir":
|
||||||
val := pts[1]
|
val := pts[1]
|
||||||
if val[len(val)-1] != '/' {
|
if val[len(val)-1] != os.PathSeparator {
|
||||||
val = val + "/"
|
val = val + string(os.PathSeparator)
|
||||||
}
|
}
|
||||||
cfg.Set("dbdir", val)
|
cfg.Set("dbdir", val)
|
||||||
case "dbname":
|
case "dbname":
|
||||||
|
Loading…
Reference in New Issue
Block a user