aboutsummaryrefslogtreecommitdiff
path: root/cryptfs/intrablock.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2015-10-04 14:36:20 +0200
committerJakob Unterwurzacher2015-10-04 14:49:47 +0200
commit89fef80d32708874c95742db0a7b593bcfd3b31d (patch)
treeadffeac51b1e945e32583b07ab0328a3c2539aad /cryptfs/intrablock.go
parent5bd08abf4095fb553355c9b007c8ae4a4314b970 (diff)
Run go fmt
Diffstat (limited to 'cryptfs/intrablock.go')
-rw-r--r--cryptfs/intrablock.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/cryptfs/intrablock.go b/cryptfs/intrablock.go
index 552cb3c..7f3a1eb 100644
--- a/cryptfs/intrablock.go
+++ b/cryptfs/intrablock.go
@@ -2,10 +2,10 @@ package cryptfs
// intraBlock identifies a part of a file block
type intraBlock struct {
- BlockNo uint64 // Block number in file
- Skip uint64 // Offset into block plaintext
- Length uint64 // Length of data from this block
- fs *CryptFS
+ BlockNo uint64 // Block number in file
+ Skip uint64 // Offset into block plaintext
+ Length uint64 // Length of data from this block
+ fs *CryptFS
}
// isPartial - is the block partial? This means we have to do read-modify-write.
@@ -29,9 +29,9 @@ func (ib *intraBlock) PlaintextRange() (offset uint64, length uint64) {
}
// CropBlock - crop a potentially larger plaintext block down to the relevant part
-func (ib *intraBlock) CropBlock(d []byte) []byte{
+func (ib *intraBlock) CropBlock(d []byte) []byte {
lenHave := len(d)
- lenWant := int(ib.Skip+ib.Length)
+ lenWant := int(ib.Skip + ib.Length)
if lenHave < lenWant {
return d[ib.Skip:lenHave]
}