2 Commits

Author SHA1 Message Date
Bel LaPointe
8c45d4a7df pttodo-cli works even if file does not initially exist 2021-12-31 22:05:47 -05:00
Bel LaPointe
1e3f24b4d5 rename gomod, root project 2021-12-31 21:58:02 -05:00
4 changed files with 11 additions and 9 deletions

View File

@@ -40,6 +40,7 @@ func edit(filepath string) error {
if err != nil {
return err
}
if _, err := os.Stat(filepath); err == nil {
g, err := os.Open(filepath)
if err != nil {
return err
@@ -48,6 +49,7 @@ func edit(filepath string) error {
return err
}
g.Close()
}
f.Close()
tempFile = f.Name()
return nil

View File

@@ -1,4 +1,4 @@
module pttodo
module pttodo-cli
go 1.17

2
go.mod
View File

@@ -1,4 +1,4 @@
module local/pt-todo-server
module pttodo
go 1.17