MaximeD / gost

A gist client in go
MIT License
72 stars 5 forks source link

Download (-g) doesn't work #16

Closed npat-efault closed 10 years ago

npat-efault commented 10 years ago

It seems (?) the JSON served by github.com has changed. I had to modify a field-tag in gist_json.go, type FileDetails, to make download work again. See patch below:

diff --git a/json/gist_json.go b/json/gist_json.go
index f1d66d9..5c77a0c 100644
--- a/json/gist_json.go
+++ b/json/gist_json.go
@@ -48,7 +48,7 @@ type File struct {
 }

 type FileDetails struct {
-   FileName string `json:"file_name"`
+   FileName string `json:"filename"`
    Type     string `json:"type"`
    Language string `json:"language"`
    RawUrl   string `json:"raw_url"`
MaximeD commented 10 years ago

Thanks for spotting this bug, this is fix now.