Simplify fs codebase, split them into separate files and more commenting

This commit is contained in:
Harshavardhana
2015-03-08 16:58:36 -07:00
parent f4271e1114
commit 41653774fc
10 changed files with 695 additions and 504 deletions

View File

@@ -25,6 +25,7 @@ import (
"strconv"
)
// Version - format version
const (
Version = uint32(1)
)
@@ -102,7 +103,7 @@ func Write(target io.Writer, key string, part uint8, length uint32, k, m uint8,
return nil
}
// Read an erasure block
// ReadHeader - read an erasure block
func ReadHeader(reader io.Reader) (dataHeader DataHeader, err error) {
versionArray := make([]byte, 4)
if err := binary.Read(reader, binary.LittleEndian, versionArray); err != nil {