Run go fmt

This commit is contained in:
Jakob Unterwurzacher 2015-10-07 22:58:22 +02:00
parent c4a66bc30d
commit ed1df49af5
5 changed files with 16 additions and 17 deletions

View File

@ -3,10 +3,10 @@ package cryptfs
// File content encryption / decryption
import (
"encoding/binary"
"bytes"
"crypto/cipher"
"crypto/md5"
"encoding/binary"
"encoding/hex"
"errors"
"os"
@ -197,7 +197,7 @@ func (be *CryptFS) CropPlaintext(plaintext []byte, blocks []intraBlock) []byte {
length := (last.BlockNo - blocks[0].BlockNo + 1) * be.plainBS
var cropped []byte
if offset+length > uint64(len(plaintext)) {
cropped = plaintext[offset:len(plaintext)]
cropped = plaintext[offset:]
} else {
cropped = plaintext[offset : offset+length]
}

View File

@ -2,9 +2,9 @@ package cryptfs
import (
"bytes"
"fmt"
"crypto/rand"
"encoding/hex"
"fmt"
)
// Get "n" random bytes from /dev/urandom or panic

View File

@ -1,14 +1,13 @@
package main
import (
"os"
"fmt"
"encoding/hex"
"strings"
"fmt"
"github.com/rfjakob/gocryptfs/cryptfs"
"os"
"strings"
)
// printMasterKey - remind the user that he should store the master key in
// a safe place
func printMasterKey(key []byte) {

View File

@ -1,11 +1,11 @@
package main
import (
"syscall"
"bytes"
"fmt"
"os"
"io/ioutil"
"os"
"syscall"
)
// cmdline looks like this: /bin/bash \0 /path/to/gocryptfs \0 --zerokey \0 ...

View File

@ -6,14 +6,14 @@ package benchmark
// go test -bench=.
import (
"fmt"
"os"
"bytes"
"crypto/aes"
"crypto/cipher"
"github.com/spacemonkeygo/openssl"
"testing"
"fmt"
"github.com/rfjakob/gocryptfs/cryptfs"
"github.com/spacemonkeygo/openssl"
"os"
"testing"
)
func TestMain(m *testing.M) {