0

So i am new to Golang (started learning it today) and i have been writing a URL shortener however after running go install and then running the compiled program from the CLI it returns this error:

2014/04/05 19:05:27 invalid character '<' looking for beginning of value
exit status 1

code refrence: https://github.com/hullswitch/urlshortnr

4

1 回答 1

1

您的问题是由您对 Google URL Shortner 的请求引起的。它返回带有 HTML 正文而不是 JSON 的 404 错误。您log.Println(string(output))可以if在. err_Unmarshal

于 2014-04-05T08:27:25.497 回答