Commit b487e138 authored by Luke Champine's avatar Luke Champine

separate imports into stdlib, 3rd-party, local

parent 53e694f8
......@@ -4,6 +4,7 @@ import (
"fmt"
"github.com/spf13/cobra"
"gitlab.com/NebulousLabs/Sia/build"
)
......
......@@ -5,9 +5,9 @@ import (
"fmt"
"os"
"gitlab.com/NebulousLabs/Sia/types"
"github.com/spf13/cobra"
"gitlab.com/NebulousLabs/Sia/types"
)
var (
......
......@@ -7,6 +7,7 @@ import (
"text/tabwriter"
"github.com/spf13/cobra"
"gitlab.com/NebulousLabs/Sia/modules"
)
......
......@@ -8,12 +8,12 @@ import (
"strings"
"text/tabwriter"
"github.com/spf13/cobra"
"gitlab.com/NebulousLabs/Sia/crypto"
"gitlab.com/NebulousLabs/Sia/modules"
"gitlab.com/NebulousLabs/Sia/node/api/client"
"gitlab.com/NebulousLabs/Sia/types"
"github.com/spf13/cobra"
)
var (
......
......@@ -14,15 +14,15 @@ import (
"text/tabwriter"
"time"
"github.com/spf13/cobra"
"gitlab.com/NebulousLabs/errors"
"gitlab.com/NebulousLabs/Sia/modules"
"gitlab.com/NebulousLabs/Sia/modules/renter/siadir"
"gitlab.com/NebulousLabs/Sia/modules/renter/siafile"
"gitlab.com/NebulousLabs/Sia/node/api"
"gitlab.com/NebulousLabs/Sia/node/api/client"
"gitlab.com/NebulousLabs/Sia/types"
"github.com/spf13/cobra"
"gitlab.com/NebulousLabs/errors"
)
var (
......
......@@ -12,11 +12,12 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/cobra/doc"
mnemonics "gitlab.com/NebulousLabs/entropy-mnemonics"
"gitlab.com/NebulousLabs/Sia/crypto"
"gitlab.com/NebulousLabs/Sia/encoding"
"gitlab.com/NebulousLabs/Sia/modules"
"gitlab.com/NebulousLabs/Sia/types"
mnemonics "gitlab.com/NebulousLabs/entropy-mnemonics"
)
var (
......
......@@ -14,6 +14,7 @@ import (
"time"
"github.com/spf13/cobra"
mnemonics "gitlab.com/NebulousLabs/entropy-mnemonics"
"golang.org/x/crypto/ssh/terminal"
"gitlab.com/NebulousLabs/Sia/crypto"
......@@ -21,7 +22,6 @@ import (
"gitlab.com/NebulousLabs/Sia/modules"
"gitlab.com/NebulousLabs/Sia/modules/wallet"
"gitlab.com/NebulousLabs/Sia/types"
"gitlab.com/NebulousLabs/entropy-mnemonics"
)
var (
......
......@@ -12,15 +12,15 @@ import (
"syscall"
"time"
"github.com/spf13/cobra"
"gitlab.com/NebulousLabs/errors"
"gitlab.com/NebulousLabs/fastrand"
"golang.org/x/crypto/ssh/terminal"
"gitlab.com/NebulousLabs/Sia/build"
"gitlab.com/NebulousLabs/Sia/modules"
"gitlab.com/NebulousLabs/Sia/node/api/server"
"gitlab.com/NebulousLabs/Sia/profile"
"gitlab.com/NebulousLabs/errors"
"gitlab.com/NebulousLabs/fastrand"
"github.com/spf13/cobra"
"golang.org/x/crypto/ssh/terminal"
)
// passwordPrompt securely reads a password from stdin.
......
......@@ -13,9 +13,9 @@ import (
"errors"
"hash"
"gitlab.com/NebulousLabs/Sia/encoding"
"golang.org/x/crypto/blake2b"
"gitlab.com/NebulousLabs/Sia/encoding"
)
const (
......
......@@ -3,9 +3,9 @@ package crypto
import (
"bytes"
"gitlab.com/NebulousLabs/Sia/encoding"
"gitlab.com/NebulousLabs/merkletree"
"gitlab.com/NebulousLabs/Sia/encoding"
)
const (
......
......@@ -5,10 +5,10 @@ import (
"errors"
"io"
"gitlab.com/NebulousLabs/Sia/encoding"
"gitlab.com/NebulousLabs/fastrand"
"golang.org/x/crypto/ed25519"
"gitlab.com/NebulousLabs/Sia/encoding"
)
const (
......
......@@ -4,8 +4,9 @@ import (
"bytes"
"testing"
"gitlab.com/NebulousLabs/Sia/encoding"
"gitlab.com/NebulousLabs/fastrand"
"gitlab.com/NebulousLabs/Sia/encoding"
)
// TestUnitSignatureEncoding creates and encodes a public key, and verifies
......
......@@ -9,6 +9,7 @@ import (
"time"
bolt "github.com/coreos/bbolt"
"gitlab.com/NebulousLabs/Sia/modules"
"gitlab.com/NebulousLabs/Sia/types"
)
......
......@@ -8,6 +8,7 @@ import (
"unsafe"
bolt "github.com/coreos/bbolt"
"gitlab.com/NebulousLabs/Sia/modules"
"gitlab.com/NebulousLabs/Sia/persist"
"gitlab.com/NebulousLabs/Sia/types"
......
......@@ -3,9 +3,10 @@ package consensus
import (
"testing"
"gitlab.com/NebulousLabs/fastrand"
"gitlab.com/NebulousLabs/Sia/crypto"
"gitlab.com/NebulousLabs/Sia/types"
"gitlab.com/NebulousLabs/fastrand"
)
// testBlockSuite tests a wide variety of blocks.
......
......@@ -5,6 +5,7 @@ package consensus
import (
bolt "github.com/coreos/bbolt"
"gitlab.com/NebulousLabs/Sia/build"
"gitlab.com/NebulousLabs/Sia/modules"
"gitlab.com/NebulousLabs/Sia/types"
......
......@@ -3,7 +3,6 @@ package consensus
/*
import (
"testing"
"gitlab.com/NebulousLabs/Sia/modules"
"gitlab.com/NebulousLabs/Sia/types"
)
......
......@@ -18,6 +18,7 @@ package consensus
import (
bolt "github.com/coreos/bbolt"
"gitlab.com/NebulousLabs/Sia/build"
"gitlab.com/NebulousLabs/Sia/crypto"
"gitlab.com/NebulousLabs/Sia/encoding"
......
......@@ -8,6 +8,7 @@ package consensus
import (
bolt "github.com/coreos/bbolt"
"gitlab.com/NebulousLabs/Sia/build"
"gitlab.com/NebulousLabs/Sia/encoding"
"gitlab.com/NebulousLabs/Sia/modules"
......
......@@ -5,6 +5,7 @@ package consensus
import (
bolt "github.com/coreos/bbolt"
"gitlab.com/NebulousLabs/Sia/encoding"
"gitlab.com/NebulousLabs/Sia/types"
)
......
......@@ -10,13 +10,13 @@ import (
"errors"
bolt "github.com/coreos/bbolt"
"gitlab.com/NebulousLabs/demotemutex"
"gitlab.com/NebulousLabs/Sia/encoding"
"gitlab.com/NebulousLabs/Sia/modules"
"gitlab.com/NebulousLabs/Sia/persist"
siasync "gitlab.com/NebulousLabs/Sia/sync"
"gitlab.com/NebulousLabs/Sia/types"
"gitlab.com/NebulousLabs/demotemutex"
)
var (
......
......@@ -4,6 +4,8 @@ import (
"path/filepath"
"testing"
"gitlab.com/NebulousLabs/fastrand"
"gitlab.com/NebulousLabs/Sia/build"
"gitlab.com/NebulousLabs/Sia/crypto"
"gitlab.com/NebulousLabs/Sia/modules"
......@@ -12,7 +14,6 @@ import (
"gitlab.com/NebulousLabs/Sia/modules/transactionpool"
"gitlab.com/NebulousLabs/Sia/modules/wallet"
"gitlab.com/NebulousLabs/Sia/types"
"gitlab.com/NebulousLabs/fastrand"
)
// A consensusSetTester is the helper object for consensus set testing,
......
......@@ -6,11 +6,12 @@ import (
"fmt"
bolt "github.com/coreos/bbolt"
"gitlab.com/NebulousLabs/fastrand"
"gitlab.com/NebulousLabs/Sia/build"
"gitlab.com/NebulousLabs/Sia/crypto"
"gitlab.com/NebulousLabs/Sia/encoding"
"gitlab.com/NebulousLabs/Sia/types"
"gitlab.com/NebulousLabs/fastrand"
)
// manageErr handles an error detected by the consistency checks.
......
......@@ -2,6 +2,7 @@ package consensus
import (
bolt "github.com/coreos/bbolt"
"gitlab.com/NebulousLabs/Sia/crypto"
)
......
......@@ -9,6 +9,7 @@ import (
"os"
bolt "github.com/coreos/bbolt"
"gitlab.com/NebulousLabs/Sia/build"
"gitlab.com/NebulousLabs/Sia/encoding"
"gitlab.com/NebulousLabs/Sia/persist"
......
......@@ -6,9 +6,9 @@ import (
"math/big"
bolt "github.com/coreos/bbolt"
"gitlab.com/NebulousLabs/Sia/types"
"gitlab.com/NebulousLabs/errors"
"gitlab.com/NebulousLabs/Sia/types"
)
// Errors returned by this file.
......
......@@ -6,6 +6,7 @@ import (
"testing"
bolt "github.com/coreos/bbolt"
"gitlab.com/NebulousLabs/Sia/types"
)
......
......@@ -4,6 +4,7 @@ import (
"errors"
bolt "github.com/coreos/bbolt"
"gitlab.com/NebulousLabs/Sia/build"
"gitlab.com/NebulousLabs/Sia/encoding"
"gitlab.com/NebulousLabs/Sia/modules"
......
......@@ -4,6 +4,7 @@ import (
"testing"
bolt "github.com/coreos/bbolt"
"gitlab.com/NebulousLabs/Sia/modules"
"gitlab.com/NebulousLabs/Sia/types"
)
......
......@@ -4,6 +4,7 @@ import (
"errors"
bolt "github.com/coreos/bbolt"
"gitlab.com/NebulousLabs/Sia/build"
"gitlab.com/NebulousLabs/Sia/modules"
)
......
......@@ -4,6 +4,7 @@ import (
"errors"
bolt "github.com/coreos/bbolt"
"gitlab.com/NebulousLabs/Sia/build"
"gitlab.com/NebulousLabs/Sia/encoding"
"gitlab.com/NebulousLabs/Sia/modules"
......
......@@ -3,8 +3,6 @@ package consensus
/*
import (
"testing"
"gitlab.com/NebulousLabs/Sia/modules"
"gitlab.com/NebulousLabs/Sia/types"
)
......
......@@ -7,6 +7,7 @@ import (
"path/filepath"
bolt "github.com/coreos/bbolt"
"gitlab.com/NebulousLabs/Sia/build"
"gitlab.com/NebulousLabs/Sia/modules"
"gitlab.com/NebulousLabs/Sia/persist"
......
......@@ -4,6 +4,7 @@ import (
"math/big"
bolt "github.com/coreos/bbolt"
"gitlab.com/NebulousLabs/Sia/build"
"gitlab.com/NebulousLabs/Sia/crypto"
"gitlab.com/NebulousLabs/Sia/encoding"
......
......@@ -5,6 +5,7 @@ import (
"time"
bolt "github.com/coreos/bbolt"
"gitlab.com/NebulousLabs/Sia/build"
"gitlab.com/NebulousLabs/Sia/modules"
......
......@@ -5,6 +5,7 @@ import (
"testing"
bolt "github.com/coreos/bbolt"
"gitlab.com/NebulousLabs/Sia/modules"
)
......
......@@ -7,6 +7,7 @@ import (
"time"
bolt "github.com/coreos/bbolt"
"gitlab.com/NebulousLabs/Sia/build"
"gitlab.com/NebulousLabs/Sia/crypto"
"gitlab.com/NebulousLabs/Sia/encoding"
......
......@@ -12,6 +12,7 @@ import (
"time"
bolt "github.com/coreos/bbolt"
"gitlab.com/NebulousLabs/Sia/build"
"gitlab.com/NebulousLabs/Sia/crypto"
"gitlab.com/NebulousLabs/Sia/encoding"
......
......@@ -5,6 +5,7 @@ import (
"math/big"
bolt "github.com/coreos/bbolt"
"gitlab.com/NebulousLabs/Sia/build"
"gitlab.com/NebulousLabs/Sia/crypto"
"gitlab.com/NebulousLabs/Sia/encoding"
......
......@@ -4,10 +4,11 @@ import (
"testing"
bolt "github.com/coreos/bbolt"
"gitlab.com/NebulousLabs/fastrand"
"gitlab.com/NebulousLabs/Sia/build"
"gitlab.com/NebulousLabs/Sia/crypto"
"gitlab.com/NebulousLabs/Sia/types"
"gitlab.com/NebulousLabs/fastrand"
)
// TestTryValidTransactionSet submits a valid transaction set to the
......
......@@ -9,9 +9,10 @@ import (
"sync"
"time"
"gitlab.com/NebulousLabs/fastrand"
"gitlab.com/NebulousLabs/Sia/build"
"gitlab.com/NebulousLabs/Sia/persist"
"gitlab.com/NebulousLabs/fastrand"
)
// ProdDependencies act as a global instance of the production dependencies to
......
......@@ -4,6 +4,7 @@ import (
"errors"
bolt "github.com/coreos/bbolt"
"gitlab.com/NebulousLabs/Sia/encoding"
"gitlab.com/NebulousLabs/Sia/types"
)
......
......@@ -2,6 +2,7 @@ package explorer
import (
bolt "github.com/coreos/bbolt"
"gitlab.com/NebulousLabs/Sia/build"
"gitlab.com/NebulousLabs/Sia/modules"
"gitlab.com/NebulousLabs/Sia/types"
......
......@@ -3,9 +3,10 @@ package explorer
import (
"testing"
"gitlab.com/NebulousLabs/fastrand"
"gitlab.com/NebulousLabs/Sia/crypto"
"gitlab.com/NebulousLabs/Sia/types"
"gitlab.com/NebulousLabs/fastrand"
)
// TestImmediateBlockFacts grabs the block facts object from the block explorer
......
......@@ -5,6 +5,7 @@ import (
"path/filepath"
bolt "github.com/coreos/bbolt"
"gitlab.com/NebulousLabs/Sia/encoding"
"gitlab.com/NebulousLabs/Sia/modules"
"gitlab.com/NebulousLabs/Sia/persist"
......
......@@ -4,6 +4,7 @@ import (
"fmt"
bolt "github.com/coreos/bbolt"
"gitlab.com/NebulousLabs/Sia/build"
"gitlab.com/NebulousLabs/Sia/encoding"
"gitlab.com/NebulousLabs/Sia/modules"
......
......@@ -99,13 +99,15 @@ import (
"sync"
"time"
"gitlab.com/NebulousLabs/ratelimit"
"gitlab.com/NebulousLabs/Sia/modules"
"gitlab.com/NebulousLabs/Sia/persist"
"gitlab.com/NebulousLabs/ratelimit"
siasync "gitlab.com/NebulousLabs/Sia/sync"
"gitlab.com/NebulousLabs/errors"
"gitlab.com/NebulousLabs/fastrand"
siasync "gitlab.com/NebulousLabs/Sia/sync"
)
var (
......
......@@ -4,9 +4,10 @@ import (
"net"
"time"
"gitlab.com/NebulousLabs/errors"
"gitlab.com/NebulousLabs/Sia/encoding"
"gitlab.com/NebulousLabs/Sia/modules"
"gitlab.com/NebulousLabs/errors"
)
// discoverPeerIP is the handler for the discoverPeer RPC. It returns the
......
......@@ -6,11 +6,12 @@ import (
"net"
"time"
"gitlab.com/NebulousLabs/fastrand"
"gitlab.com/NebulousLabs/Sia/build"
"gitlab.com/NebulousLabs/Sia/encoding"
"gitlab.com/NebulousLabs/Sia/modules"
"gitlab.com/NebulousLabs/Sia/types"
"gitlab.com/NebulousLabs/fastrand"
)
var (
......
......@@ -7,10 +7,11 @@ import (
"testing"
"time"
"gitlab.com/NebulousLabs/fastrand"
"gitlab.com/NebulousLabs/Sia/build"
"gitlab.com/NebulousLabs/Sia/encoding"
"gitlab.com/NebulousLabs/Sia/modules"
"gitlab.com/NebulousLabs/fastrand"
)
const dummyNode = "111.111.111.111:1111"
......
......@@ -6,12 +6,13 @@ import (
"net"
"time"
"gitlab.com/NebulousLabs/fastrand"
"gitlab.com/NebulousLabs/ratelimit"
"gitlab.com/NebulousLabs/Sia/build"
"gitlab.com/NebulousLabs/Sia/encoding"
"gitlab.com/NebulousLabs/Sia/modules"
"gitlab.com/NebulousLabs/Sia/types"
"gitlab.com/NebulousLabs/fastrand"
"gitlab.com/NebulousLabs/ratelimit"
)
var (
......
......@@ -9,11 +9,12 @@ import (
"testing"
"time"
"gitlab.com/NebulousLabs/fastrand"
"gitlab.com/NebulousLabs/Sia/build"
"gitlab.com/NebulousLabs/Sia/encoding"
"gitlab.com/NebulousLabs/Sia/modules"
"gitlab.com/NebulousLabs/Sia/types"
"gitlab.com/NebulousLabs/fastrand"
)
// dummyConn implements the net.Conn interface, but does not carry any actual
......
package gateway
import (
"gitlab.com/NebulousLabs/fastrand"
"gitlab.com/NebulousLabs/Sia/build"
"gitlab.com/NebulousLabs/Sia/modules"
"gitlab.com/NebulousLabs/fastrand"
)
// managedPeerManagerConnect is a blocking function which tries to connect to
......
......@@ -5,9 +5,10 @@ import (
"path/filepath"
"time"
"gitlab.com/NebulousLabs/errors"
"gitlab.com/NebulousLabs/Sia/modules"
"gitlab.com/NebulousLabs/Sia/persist"
"gitlab.com/NebulousLabs/errors"
)
const (
......
......@@ -4,6 +4,7 @@ import (
"net"
"github.com/xtaci/smux"
"gitlab.com/NebulousLabs/Sia/build"
)
......
......@@ -4,9 +4,10 @@ import (
"fmt"
"net"
"gitlab.com/NebulousLabs/errors"
"gitlab.com/NebulousLabs/Sia/build"
"gitlab.com/NebulousLabs/Sia/modules"
"gitlab.com/NebulousLabs/errors"
)
var (
......
......@@ -7,9 +7,10 @@ import (
"sync"
"testing"
"gitlab.com/NebulousLabs/fastrand"
"gitlab.com/NebulousLabs/Sia/build"
"gitlab.com/NebulousLabs/Sia/modules"
"gitlab.com/NebulousLabs/fastrand"
)
// TestParallelFileAccess using a single file handle + ReadAt and WriteAt to
......
......@@ -6,10 +6,11 @@ import (
"path/filepath"
"sync/atomic"
"gitlab.com/NebulousLabs/fastrand"
"gitlab.com/NebulousLabs/Sia/build"
"gitlab.com/NebulousLabs/Sia/crypto"
"gitlab.com/NebulousLabs/Sia/persist"
"gitlab.com/NebulousLabs/fastrand"
)
type (
......
......@@ -18,9 +18,10 @@ import (
"sync"
"testing"
"gitlab.com/NebulousLabs/fastrand"