use t.Fatal

pull/44/head
Yasuhiro Matsumoto 2017-04-24 19:40:26 +09:00
parent d0cd67efbc
commit e29b2993a6
1 changed files with 2 additions and 3 deletions

View File

@ -4,7 +4,6 @@ import (
"encoding/json" "encoding/json"
"flag" "flag"
"io/ioutil" "io/ioutil"
"log"
"os" "os"
"testing" "testing"
@ -98,11 +97,11 @@ func TestGetConfig(t *testing.T) {
config.AccessToken = "foo" config.AccessToken = "foo"
b, err := json.MarshalIndent(config, "", " ") b, err := json.MarshalIndent(config, "", " ")
if err != nil { if err != nil {
log.Fatal(err) t.Fatal(err)
} }
err = ioutil.WriteFile(file, b, 0700) err = ioutil.WriteFile(file, b, 0700)
if err != nil { if err != nil {
log.Fatal(err) t.Fatal(err)
} }
file, config, err = getConfig(c) file, config, err = getConfig(c)
if err != nil { if err != nil {