move git stuff out of main

This commit is contained in:
ston1th 2019-12-10 00:04:27 +01:00
commit a021fab543
5 changed files with 250 additions and 230 deletions

View file

@ -80,6 +80,8 @@ func readBody(r io.ReadCloser, i interface{}) (body []byte, err error) {
if debug {
log.Printf("debug: %s", string(body))
}
err = json.Unmarshal(body, i)
if i != nil {
err = json.Unmarshal(body, i)
}
return
}