change json lib

This commit is contained in:
Jay
2019-03-27 13:32:24 +00:00
parent a3b44ba5d9
commit b98aab2d0d
3 changed files with 5 additions and 3 deletions
+2 -2
View File
@@ -1,7 +1,6 @@
package google
import (
"encoding/json"
"errors"
"fmt"
"io/ioutil"
@@ -10,11 +9,13 @@ import (
"strings"
"git.trj.tw/golang/mtfosbot/module/apis"
jsoniter "github.com/json-iterator/go"
"git.trj.tw/golang/mtfosbot/module/config"
)
var baseURL = "https://www.googleapis.com"
var json = jsoniter.ConfigCompatibleWithStandardLibrary
func getURL(p string, querystring ...interface{}) (string, bool) {
u, err := url.Parse(baseURL)
@@ -94,7 +95,6 @@ func QueryYoutubeName(id string) (n string, err error) {
}
bodyBytes, err := ioutil.ReadAll(resp.Body)
fmt.Println("show yt resp body :: ", string(bodyBytes))
if err != nil {
return "", err
}