]> git.ipfire.org Git - thirdparty/wireguard-go.git/commitdiff
global: regroup all imports
authorJason A. Donenfeld <Jason@zx2c4.com>
Tue, 14 May 2019 07:09:52 +0000 (09:09 +0200)
committerJason A. Donenfeld <Jason@zx2c4.com>
Tue, 14 May 2019 07:09:52 +0000 (09:09 +0200)
27 files changed:
device/boundif_windows.go
device/conn.go
device/conn_linux.go
device/cookie.go
device/device.go
device/kdf_test.go
device/keypair.go
device/mark_unix.go
device/noise-helpers.go
device/noise-protocol.go
device/noise-types.go
device/receive.go
device/send.go
device/tun.go
device/uapi.go
ipc/uapi_bsd.go
ipc/uapi_linux.go
ipc/uapi_windows.go
main.go
main_windows.go
rwcancel/rwcancel.go
tun/helper_test.go
tun/tun_darwin.go
tun/tun_freebsd.go
tun/tun_linux.go
tun/tun_openbsd.go
tun/wintun/netshell/netshell_windows.go

index 97381adf930d4e8a4f98d4c4fd6b61d2b1677cf3..b842ba878d4b86d7fd5f093621e24e79b9a4cb72 100644 (file)
@@ -7,8 +7,9 @@ package device
 
 import (
        "encoding/binary"
-       "golang.org/x/sys/windows"
        "unsafe"
+
+       "golang.org/x/sys/windows"
 )
 
 const (
index d57aa8cb1cb2ff7c6aab2026636dbff0075b9efe..7b341f6b25f2738199ae94a26e5541db827fd5f3 100644 (file)
@@ -7,10 +7,11 @@ package device
 
 import (
        "errors"
-       "golang.org/x/net/ipv4"
-       "golang.org/x/net/ipv6"
        "net"
        "strings"
+
+       "golang.org/x/net/ipv4"
+       "golang.org/x/net/ipv6"
 )
 
 const (
index 06b15f92eb438f38d80762b63af5aeb6a21a76f8..ebbbe11b7a29d9c35f54eacf363e382df475885c 100644 (file)
@@ -18,13 +18,14 @@ package device
 
 import (
        "errors"
-       "golang.org/x/sys/unix"
-       "golang.zx2c4.com/wireguard/rwcancel"
        "net"
        "strconv"
        "sync"
        "syscall"
        "unsafe"
+
+       "golang.org/x/sys/unix"
+       "golang.zx2c4.com/wireguard/rwcancel"
 )
 
 const (
index 2f210679e701afcb9c9546381071f180c3fd0f27..3a88a0c018797d0b7588a4041039908b137ac7bc 100644 (file)
@@ -8,10 +8,11 @@ package device
 import (
        "crypto/hmac"
        "crypto/rand"
-       "golang.org/x/crypto/blake2s"
-       "golang.org/x/crypto/chacha20poly1305"
        "sync"
        "time"
+
+       "golang.org/x/crypto/blake2s"
+       "golang.org/x/crypto/chacha20poly1305"
 )
 
 type CookieChecker struct {
index d6c96d6905c28e8c8c7ae44552f835d6bd4991d7..ef269f5a9fc0a082c1540440f0032732b71659ea 100644 (file)
@@ -6,12 +6,13 @@
 package device
 
 import (
-       "golang.zx2c4.com/wireguard/ratelimiter"
-       "golang.zx2c4.com/wireguard/tun"
        "runtime"
        "sync"
        "sync/atomic"
        "time"
+
+       "golang.zx2c4.com/wireguard/ratelimiter"
+       "golang.zx2c4.com/wireguard/tun"
 )
 
 const (
index 11ea8d5ec790c5fcaa55055b4381d51831688806..cb8dbab2c4595a8a448c11217144706af9c384c4 100644 (file)
@@ -7,8 +7,9 @@ package device
 
 import (
        "encoding/hex"
-       "golang.org/x/crypto/blake2s"
        "testing"
+
+       "golang.org/x/crypto/blake2s"
 )
 
 type KDFTest struct {
index a9fbfce92cdf032bac316e13298234b375573268..9c78fa912add274cd8dc0367ee651759c124d8e0 100644 (file)
@@ -7,9 +7,10 @@ package device
 
 import (
        "crypto/cipher"
-       "golang.zx2c4.com/wireguard/replay"
        "sync"
        "time"
+
+       "golang.zx2c4.com/wireguard/replay"
 )
 
 /* Due to limitations in Go and /x/crypto there is currently
index a791c71248a66bc036b29c075d206e67e5277e42..669b3281464e6004076b6de9905fa362111cf412 100644 (file)
@@ -8,8 +8,9 @@
 package device
 
 import (
-       "golang.org/x/sys/unix"
        "runtime"
+
+       "golang.org/x/sys/unix"
 )
 
 var fwmarkIoctl int
index 4b09bf36cb4dcda6293e2cc90c9a239140f91683..03e6ec68ad75c5fa224ae9d65616f679a712b53a 100644 (file)
@@ -9,9 +9,10 @@ import (
        "crypto/hmac"
        "crypto/rand"
        "crypto/subtle"
+       "hash"
+
        "golang.org/x/crypto/blake2s"
        "golang.org/x/crypto/curve25519"
-       "hash"
 )
 
 /* KDF related functions.
index 73826e15bc31e3d40d771c86fd6d253cf59c5823..1f70e810268436cc4820bc5c682153a7fb675bb5 100644 (file)
@@ -7,12 +7,13 @@ package device
 
 import (
        "errors"
+       "sync"
+       "time"
+
        "golang.org/x/crypto/blake2s"
        "golang.org/x/crypto/chacha20poly1305"
        "golang.org/x/crypto/poly1305"
        "golang.zx2c4.com/wireguard/tai64n"
-       "sync"
-       "time"
 )
 
 const (
index 82b12c1cc61922103515590de2af58eade8a3b5f..6b1f16f5179ba674ee6e523d9e51eb1844d4d8bf 100644 (file)
@@ -9,6 +9,7 @@ import (
        "crypto/subtle"
        "encoding/hex"
        "errors"
+
        "golang.org/x/crypto/chacha20poly1305"
 )
 
index 747a188cc5872b713f23bdf97bfd9b4b7f1ffa7d..22870f2de6c34c9b1d87c0c4dd53d0533fe69502 100644 (file)
@@ -8,14 +8,15 @@ package device
 import (
        "bytes"
        "encoding/binary"
-       "golang.org/x/crypto/chacha20poly1305"
-       "golang.org/x/net/ipv4"
-       "golang.org/x/net/ipv6"
        "net"
        "strconv"
        "sync"
        "sync/atomic"
        "time"
+
+       "golang.org/x/crypto/chacha20poly1305"
+       "golang.org/x/net/ipv4"
+       "golang.org/x/net/ipv6"
 )
 
 type QueueHandshakeElement struct {
index ccb28da669fe9c40f7ca6e4a885687e02c456c7c..ae96aa20226cafb110fe068816bf058ffaea1fc1 100644 (file)
@@ -8,13 +8,14 @@ package device
 import (
        "bytes"
        "encoding/binary"
-       "golang.org/x/crypto/chacha20poly1305"
-       "golang.org/x/net/ipv4"
-       "golang.org/x/net/ipv6"
        "net"
        "sync"
        "sync/atomic"
        "time"
+
+       "golang.org/x/crypto/chacha20poly1305"
+       "golang.org/x/net/ipv4"
+       "golang.org/x/net/ipv6"
 )
 
 /* Outbound flow
index bc5f1f1da6872a84b0bc4afa1405ba65056a1b38..fe1158c1b87ebd63a1bdffd6c0a52a013a39ce9a 100644 (file)
@@ -6,8 +6,9 @@
 package device
 
 import (
-       "golang.zx2c4.com/wireguard/tun"
        "sync/atomic"
+
+       "golang.zx2c4.com/wireguard/tun"
 )
 
 const DefaultMTU = 1420
index fb620484e1dc40f6311850d7db5cc9efdacc5859..99cb4214545dc52b3915d81c8141b9d00223c76e 100644 (file)
@@ -8,13 +8,14 @@ package device
 import (
        "bufio"
        "fmt"
-       "golang.zx2c4.com/wireguard/ipc"
        "io"
        "net"
        "strconv"
        "strings"
        "sync/atomic"
        "time"
+
+       "golang.zx2c4.com/wireguard/ipc"
 )
 
 type IPCError struct {
index f66c3864638d667dd474c6d0eea8d2eddf6e2583..75cc0e3e8e54fd123af18239489e8b393d21d276 100644 (file)
@@ -10,11 +10,12 @@ package ipc
 import (
        "errors"
        "fmt"
-       "golang.org/x/sys/unix"
        "net"
        "os"
        "path"
        "unsafe"
+
+       "golang.org/x/sys/unix"
 )
 
 var socketDirectory = "/var/run/wireguard"
index 8af3d8ceb861a2d56e68888cc24c8a6087312cdb..a3c95cadf0fee4eb9f37a9bea3c2daad4bff1847 100644 (file)
@@ -8,11 +8,12 @@ package ipc
 import (
        "errors"
        "fmt"
-       "golang.org/x/sys/unix"
-       "golang.zx2c4.com/wireguard/rwcancel"
        "net"
        "os"
        "path"
+
+       "golang.org/x/sys/unix"
+       "golang.zx2c4.com/wireguard/rwcancel"
 )
 
 var socketDirectory = "/var/run/wireguard"
index 8f0268dc4fe9f08b0955d50c660a2b8d6d209a1b..b3aeb261bf1b878c8cd5b881321cc50d555b4462 100644 (file)
@@ -6,8 +6,9 @@
 package ipc
 
 import (
-       "github.com/Microsoft/go-winio"
        "net"
+
+       "github.com/Microsoft/go-winio"
 )
 
 //TODO: replace these with actual standard windows error numbers from the win package
diff --git a/main.go b/main.go
index d13a11399957d97656908dbc618c392e2ae03c90..77a660f23318b9d0a075695e566e3d3f69f32d80 100644 (file)
--- a/main.go
+++ b/main.go
@@ -9,14 +9,15 @@ package main
 
 import (
        "fmt"
-       "golang.zx2c4.com/wireguard/device"
-       "golang.zx2c4.com/wireguard/ipc"
-       "golang.zx2c4.com/wireguard/tun"
        "os"
        "os/signal"
        "runtime"
        "strconv"
        "syscall"
+
+       "golang.zx2c4.com/wireguard/device"
+       "golang.zx2c4.com/wireguard/ipc"
+       "golang.zx2c4.com/wireguard/tun"
 )
 
 const (
index 4954adc9c584fc157bd6296424c471398ec30c00..5380f567bc65b5c7d035b6e123e16db2ed0aadd4 100644 (file)
@@ -7,12 +7,13 @@ package main
 
 import (
        "fmt"
-       "golang.zx2c4.com/wireguard/device"
-       "golang.zx2c4.com/wireguard/ipc"
        "os"
        "os/signal"
        "syscall"
 
+       "golang.zx2c4.com/wireguard/device"
+       "golang.zx2c4.com/wireguard/ipc"
+
        "golang.zx2c4.com/wireguard/tun"
 )
 
index 398431029f895aa64df0a38cf873848779b1a0e1..62397c29aaf56ddd700c5155d619b110ef85b4db 100644 (file)
@@ -7,9 +7,10 @@ package rwcancel
 
 import (
        "errors"
-       "golang.org/x/sys/unix"
        "os"
        "syscall"
+
+       "golang.org/x/sys/unix"
 )
 
 func max(a, b int) int {
index 3e86fc8b3fcd33316e523fc9fbfcc9928c021ce2..4fa0357de8f648392439bdfc3d55c2352a2409df 100644 (file)
@@ -8,9 +8,10 @@ package tun
 import (
        "bytes"
        "errors"
-       "golang.zx2c4.com/wireguard/tun"
        "os"
        "testing"
+
+       "golang.zx2c4.com/wireguard/tun"
 )
 
 /* Helpers for writing unit tests
index 2afe9de80cccc0acfba176205170cf823f222dc9..f7cf8e8abd35d0497ca27c4e37c4b5cc2d3b859c 100644 (file)
@@ -7,13 +7,14 @@ package tun
 
 import (
        "fmt"
-       "golang.org/x/net/ipv6"
-       "golang.org/x/sys/unix"
        "io/ioutil"
        "net"
        "os"
        "syscall"
        "unsafe"
+
+       "golang.org/x/net/ipv6"
+       "golang.org/x/sys/unix"
 )
 
 const utunControlName = "com.apple.net.utun_control"
index c9c89ef65b252701daf17156857ec745026a2f3b..b7c82cf0b3f82582f0a9949105fbc0864b33db43 100644 (file)
@@ -9,12 +9,13 @@ import (
        "bytes"
        "errors"
        "fmt"
-       "golang.org/x/net/ipv6"
-       "golang.org/x/sys/unix"
        "net"
        "os"
        "syscall"
        "unsafe"
+
+       "golang.org/x/net/ipv6"
+       "golang.org/x/sys/unix"
 )
 
 // _TUNSIFHEAD, value derived from sys/net/{if_tun,ioccom}.h
index 784cb9f4f0a2a380e4bc25aef15e189b6b6bbbc0..f5f7ec776f1d1ac96d310c9a5b44ddf975848150 100644 (file)
@@ -12,15 +12,16 @@ import (
        "bytes"
        "errors"
        "fmt"
-       "golang.org/x/net/ipv6"
-       "golang.org/x/sys/unix"
-       "golang.zx2c4.com/wireguard/rwcancel"
        "net"
        "os"
        "sync"
        "syscall"
        "time"
        "unsafe"
+
+       "golang.org/x/net/ipv6"
+       "golang.org/x/sys/unix"
+       "golang.zx2c4.com/wireguard/rwcancel"
 )
 
 const (
index 645bccad602bd25e8a1db25a8f7542313c666b3f..a3db83b794d618c56324218824ec4897983ec0ff 100644 (file)
@@ -7,13 +7,14 @@ package tun
 
 import (
        "fmt"
-       "golang.org/x/net/ipv6"
-       "golang.org/x/sys/unix"
        "io/ioutil"
        "net"
        "os"
        "syscall"
        "unsafe"
+
+       "golang.org/x/net/ipv6"
+       "golang.org/x/sys/unix"
 )
 
 // Structure for iface mtu get/set ioctls
index cb0325241240752a18d13b4bf08b0727564f413f..3122d87552aeeb81dc005894077e2f5a240488e7 100644 (file)
@@ -13,7 +13,7 @@ import (
 )
 
 var (
-       modnetshell = windows.NewLazySystemDLL("netshell.dll")
+       modnetshell            = windows.NewLazySystemDLL("netshell.dll")
        procHrRenameConnection = modnetshell.NewProc("HrRenameConnection")
 )