global: regroup all imports

This commit is contained in:
Jason A. Donenfeld
2019-05-14 09:09:52 +02:00
parent 3147f00089
commit 3bf41b06ae
27 changed files with 70 additions and 44 deletions

View File

@@ -7,8 +7,9 @@ package device
import (
"encoding/binary"
"golang.org/x/sys/windows"
"unsafe"
"golang.org/x/sys/windows"
)
const (

View 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 (

View 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 (

View 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 {

View 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 (

View File

@@ -7,8 +7,9 @@ package device
import (
"encoding/hex"
"golang.org/x/crypto/blake2s"
"testing"
"golang.org/x/crypto/blake2s"
)
type KDFTest struct {

View 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

View File

@@ -8,8 +8,9 @@
package device
import (
"golang.org/x/sys/unix"
"runtime"
"golang.org/x/sys/unix"
)
var fwmarkIoctl int

View 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.

View 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 (

View File

@@ -9,6 +9,7 @@ import (
"crypto/subtle"
"encoding/hex"
"errors"
"golang.org/x/crypto/chacha20poly1305"
)

View 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 {

View 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

View File

@@ -6,8 +6,9 @@
package device
import (
"golang.zx2c4.com/wireguard/tun"
"sync/atomic"
"golang.zx2c4.com/wireguard/tun"
)
const DefaultMTU = 1420

View 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 {