diff --git a/bind.go b/bind.go index 1f3415d..611cca3 100644 --- a/bind.go +++ b/bind.go @@ -1,9 +1,10 @@ package main import ( - "golang.org/x/crypto/ssh" "log" "net" + + "golang.org/x/crypto/ssh" ) func connect() { diff --git a/cmd.go b/cmd.go index 4ac6a2f..495140b 100644 --- a/cmd.go +++ b/cmd.go @@ -81,13 +81,11 @@ func ExampleOpenFile() { if err := f.Close(); err != nil { log.Fatal(err) } - } func createTempFile() { tmpFile, _ := os.Create("emptyFile.txt") log.Println(tmpFile) - } func ExampleTempFile() { diff --git a/code.go b/code.go index 5b143c6..ab19040 100644 --- a/code.go +++ b/code.go @@ -133,7 +133,7 @@ func WriteProducts(productsSold []Product, productsLeft []Product, jsonPath stri allProducts = append(allProducts, product) } - for i, _ := range productsLeft { + for i := range productsLeft { productsLeft = append(allProducts, productsLeft[i]) } diff --git a/hex_example.go b/hex_example.go index 3ed1a97..a637bcd 100644 --- a/hex_example.go +++ b/hex_example.go @@ -2,7 +2,7 @@ package main func HexLiteral() bool { x := 0xFff - y := 0xFFF + y := 0xFFF z := 0xfff return (x == y) && (y == z) diff --git a/sync_example.go b/sync_example.go index 169cd74..e19d3e1 100644 --- a/sync_example.go +++ b/sync_example.go @@ -10,7 +10,7 @@ var dataLarge []byte const size = 64 * 1024 // 65536 func benchmarkLargeSizePool(b *testing.B) { - var bytePool = sync.Pool{ + bytePool := sync.Pool{ New: func() interface{} { b := make([]byte, size) return b diff --git a/weak_crypto.go b/weak_crypto.go index f8ae0cc..3273942 100644 --- a/weak_crypto.go +++ b/weak_crypto.go @@ -15,7 +15,7 @@ func makeMD5Hash() { } func generateRSAKey() { - //Generate Private Key + // Generate Private Key pvk, err := rsa.GenerateKey(rand.Reader, 1024) if err != nil { fmt.Println(err)