aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/main.go b/main.go
index 1cc56c7..2f82643 100644
--- a/main.go
+++ b/main.go
@@ -2,7 +2,7 @@ package main
import (
// "fmt"
- // "io/ioutil"
+ "io/ioutil"
"log"
// "os"
"time"
@@ -35,6 +35,10 @@ func main() {
}
log.Printf("%+v\n", resp)
+ defer resp.Body.Close()
+ body, err := ioutil.ReadAll(resp.Body)
+ log.Println(string(body))
+
time_entry := timetask.NewTimeEntry(
config.Profile,
config.Projects["example"],
@@ -48,6 +52,10 @@ func main() {
}
log.Printf("%+v\n", resp)
+ defer resp.Body.Close()
+ body, err = ioutil.ReadAll(resp.Body)
+ log.Println(string(body))
+
// if len(os.Args) == 1 {
// fmt.Println("Not enough arguments")
// os.Exit(1)