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
You problem is caused by your request to Google URL Shortner. It returns a 404 Error with HTML body instead of JSON. You could debug it adding log.Println(string(output))
to if
handling err
after the Unmarshal
.