Skip to content

Commit

Permalink
fix github
Browse files Browse the repository at this point in the history
  • Loading branch information
mattes committed Feb 19, 2017
1 parent 53b5528 commit 4bb46a9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions source/github/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,11 @@ func (g *Github) ReadUp(version uint) (r io.ReadCloser, identifier string, err e
return nil, "", err
}
if file != nil {
r, err := file.Decode()
r, err := file.GetContent()
if err != nil {
return nil, "", err
}
return ioutil.NopCloser(bytes.NewReader(r)), m.Identifier, nil
return ioutil.NopCloser(bytes.NewReader([]byte(r))), m.Identifier, nil
}
}
return nil, "", &os.PathError{fmt.Sprintf("read version %v", version), g.path, os.ErrNotExist}
Expand All @@ -168,11 +168,11 @@ func (g *Github) ReadDown(version uint) (r io.ReadCloser, identifier string, err
return nil, "", err
}
if file != nil {
r, err := file.Decode()
r, err := file.GetContent()
if err != nil {
return nil, "", err
}
return ioutil.NopCloser(bytes.NewReader(r)), m.Identifier, nil
return ioutil.NopCloser(bytes.NewReader([]byte(r))), m.Identifier, nil
}
}
return nil, "", &os.PathError{fmt.Sprintf("read version %v", version), g.path, os.ErrNotExist}
Expand Down

0 comments on commit 4bb46a9

Please sign in to comment.