forked from mirror/afero
Merge pull request #23 from tpng/patch-1
atomic requires struct field to be 64-bit aligned
This commit is contained in:
commit
12fcb8c83d
|
@ -34,8 +34,11 @@ type MemDir interface {
|
||||||
}
|
}
|
||||||
|
|
||||||
type InMemoryFile struct {
|
type InMemoryFile struct {
|
||||||
sync.Mutex
|
// atomic requires 64-bit alignment for struct field access
|
||||||
at int64
|
at int64
|
||||||
|
readDirCount int64
|
||||||
|
|
||||||
|
sync.Mutex
|
||||||
name string
|
name string
|
||||||
data []byte
|
data []byte
|
||||||
memDir MemDir
|
memDir MemDir
|
||||||
|
@ -43,7 +46,6 @@ type InMemoryFile struct {
|
||||||
closed bool
|
closed bool
|
||||||
mode os.FileMode
|
mode os.FileMode
|
||||||
modtime time.Time
|
modtime time.Time
|
||||||
readDirCount int64
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func MemFileCreate(name string) *InMemoryFile {
|
func MemFileCreate(name string) *InMemoryFile {
|
||||||
|
|
Loading…
Reference in New Issue