Separate the codebase for XL and FS format.json related code (#5317)

This commit is contained in:
Krishna Srinivas
2018-01-08 14:30:55 -08:00
committed by kannappanr
parent ccd9767b7a
commit 7c72d14027
8 changed files with 599 additions and 611 deletions

View File

@@ -263,3 +263,11 @@ func NewCustomHTTPTransport() http.RoundTripper {
DisableCompression: true,
}
}
// Load the json (typically from disk file).
func jsonLoadFromSeeker(r io.ReadSeeker, data interface{}) error {
if _, err := r.Seek(0, io.SeekStart); err != nil {
return err
}
return json.NewDecoder(r).Decode(data)
}