Split imports into logical groups

This commit is contained in:
Tomás Senart 2014-07-02 15:50:08 +02:00
parent 767caaa6ae
commit 84fa553b65
26 changed files with 111 additions and 85 deletions

View file

@ -11,7 +11,6 @@ import (
"encoding/binary" "encoding/binary"
"encoding/json" "encoding/json"
"fmt" "fmt"
"github.com/conformal/btcwire"
"io" "io"
"math" "math"
"math/rand" "math/rand"
@ -23,6 +22,8 @@ import (
"sync" "sync"
"sync/atomic" "sync/atomic"
"time" "time"
"github.com/conformal/btcwire"
) )
const ( const (

View file

@ -5,10 +5,11 @@
package main package main
import ( import (
"github.com/conformal/btcwire"
"net" "net"
"testing" "testing"
"time" "time"
"github.com/conformal/btcwire"
) )
// naTest is used to describe a test to be perfomed against the NetAddressKey // naTest is used to describe a test to be perfomed against the NetAddressKey

View file

@ -6,17 +6,18 @@ package main
import ( import (
"container/list" "container/list"
"github.com/conformal/btcchain"
"github.com/conformal/btcdb"
"github.com/conformal/btcnet"
"github.com/conformal/btcutil"
"github.com/conformal/btcwire"
"net" "net"
"os" "os"
"path/filepath" "path/filepath"
"sync" "sync"
"sync/atomic" "sync/atomic"
"time" "time"
"github.com/conformal/btcchain"
"github.com/conformal/btcdb"
"github.com/conformal/btcnet"
"github.com/conformal/btcutil"
"github.com/conformal/btcwire"
) )
const ( const (

View file

@ -6,13 +6,14 @@ package main
import ( import (
"fmt" "fmt"
"github.com/conformal/btcd/limits"
"net" "net"
"net/http" "net/http"
_ "net/http/pprof" _ "net/http/pprof"
"os" "os"
"runtime" "runtime"
"runtime/pprof" "runtime/pprof"
"github.com/conformal/btcd/limits"
) )
var ( var (

View file

@ -7,13 +7,6 @@ package main
import ( import (
"errors" "errors"
"fmt" "fmt"
"github.com/conformal/btcdb"
_ "github.com/conformal/btcdb/ldb"
_ "github.com/conformal/btcdb/memdb"
"github.com/conformal/btcutil"
"github.com/conformal/btcwire"
"github.com/conformal/go-flags"
"github.com/conformal/go-socks"
"net" "net"
"os" "os"
"path/filepath" "path/filepath"
@ -22,6 +15,14 @@ import (
"strconv" "strconv"
"strings" "strings"
"time" "time"
"github.com/conformal/btcdb"
_ "github.com/conformal/btcdb/ldb"
_ "github.com/conformal/btcdb/memdb"
"github.com/conformal/btcutil"
"github.com/conformal/btcwire"
flags "github.com/conformal/go-flags"
socks "github.com/conformal/go-socks"
) )
const ( const (

View file

@ -6,13 +6,14 @@ package main
import ( import (
"fmt" "fmt"
"github.com/conformal/btcchain"
"github.com/conformal/btcutil"
"github.com/conformal/btcwire"
"math/rand" "math/rand"
"runtime" "runtime"
"sync" "sync"
"time" "time"
"github.com/conformal/btcchain"
"github.com/conformal/btcutil"
"github.com/conformal/btcwire"
) )
const ( const (

5
log.go
View file

@ -6,14 +6,15 @@ package main
import ( import (
"fmt" "fmt"
"os"
"time"
"github.com/conformal/btcchain" "github.com/conformal/btcchain"
"github.com/conformal/btcdb" "github.com/conformal/btcdb"
"github.com/conformal/btclog" "github.com/conformal/btclog"
"github.com/conformal/btcscript" "github.com/conformal/btcscript"
"github.com/conformal/btcwire" "github.com/conformal/btcwire"
"github.com/conformal/seelog" "github.com/conformal/seelog"
"os"
"time"
) )
const ( const (

View file

@ -8,15 +8,16 @@ import (
"container/list" "container/list"
"crypto/rand" "crypto/rand"
"fmt" "fmt"
"math"
"math/big"
"sync"
"time"
"github.com/conformal/btcchain" "github.com/conformal/btcchain"
"github.com/conformal/btcdb" "github.com/conformal/btcdb"
"github.com/conformal/btcscript" "github.com/conformal/btcscript"
"github.com/conformal/btcutil" "github.com/conformal/btcutil"
"github.com/conformal/btcwire" "github.com/conformal/btcwire"
"math"
"math/big"
"sync"
"time"
) )
// TxRuleError identifies a rule violation. It is used to indicate that // TxRuleError identifies a rule violation. It is used to indicate that

View file

@ -8,12 +8,13 @@ import (
"container/heap" "container/heap"
"container/list" "container/list"
"fmt" "fmt"
"time"
"github.com/conformal/btcchain" "github.com/conformal/btcchain"
"github.com/conformal/btcdb" "github.com/conformal/btcdb"
"github.com/conformal/btcscript" "github.com/conformal/btcscript"
"github.com/conformal/btcutil" "github.com/conformal/btcutil"
"github.com/conformal/btcwire" "github.com/conformal/btcwire"
"time"
) )
const ( const (

View file

@ -7,6 +7,7 @@ package main
import ( import (
"container/list" "container/list"
"fmt" "fmt"
"github.com/conformal/btcwire" "github.com/conformal/btcwire"
) )

View file

@ -6,8 +6,9 @@ package main
import ( import (
"crypto/rand" "crypto/rand"
"github.com/conformal/btcwire"
"testing" "testing"
"github.com/conformal/btcwire"
) )
// BenchmarkMruInventoryList performs basic benchmarks on the most recently // BenchmarkMruInventoryList performs basic benchmarks on the most recently

13
peer.go
View file

@ -8,17 +8,18 @@ import (
"bytes" "bytes"
"container/list" "container/list"
"fmt" "fmt"
"github.com/conformal/btcchain"
"github.com/conformal/btcdb"
"github.com/conformal/btcutil"
"github.com/conformal/btcwire"
"github.com/conformal/go-socks"
"github.com/davecgh/go-spew/spew"
"net" "net"
"strconv" "strconv"
"sync" "sync"
"sync/atomic" "sync/atomic"
"time" "time"
"github.com/conformal/btcchain"
"github.com/conformal/btcdb"
"github.com/conformal/btcutil"
"github.com/conformal/btcwire"
socks "github.com/conformal/go-socks"
"github.com/davecgh/go-spew/spew"
) )
const ( const (

View file

@ -13,16 +13,6 @@ import (
"encoding/hex" "encoding/hex"
"errors" "errors"
"fmt" "fmt"
"github.com/conformal/btcchain"
"github.com/conformal/btcdb"
"github.com/conformal/btcjson"
"github.com/conformal/btcnet"
"github.com/conformal/btcscript"
"github.com/conformal/btcutil"
"github.com/conformal/btcwire"
"github.com/conformal/btcws"
"github.com/conformal/fastsha256"
"github.com/conformal/websocket"
"io" "io"
"io/ioutil" "io/ioutil"
"math/big" "math/big"
@ -34,6 +24,17 @@ import (
"sync" "sync"
"sync/atomic" "sync/atomic"
"time" "time"
"github.com/conformal/btcchain"
"github.com/conformal/btcdb"
"github.com/conformal/btcjson"
"github.com/conformal/btcnet"
"github.com/conformal/btcscript"
"github.com/conformal/btcutil"
"github.com/conformal/btcwire"
"github.com/conformal/btcws"
"github.com/conformal/fastsha256"
"github.com/conformal/websocket"
) )
const ( const (

View file

@ -6,7 +6,6 @@ package main
import ( import (
"bytes" "bytes"
"code.google.com/p/go.crypto/ripemd160"
"container/list" "container/list"
"crypto/subtle" "crypto/subtle"
"encoding/base64" "encoding/base64"
@ -14,6 +13,11 @@ import (
"encoding/json" "encoding/json"
"errors" "errors"
"fmt" "fmt"
"io"
"sync"
"time"
"code.google.com/p/go.crypto/ripemd160"
"github.com/conformal/btcjson" "github.com/conformal/btcjson"
"github.com/conformal/btcscript" "github.com/conformal/btcscript"
"github.com/conformal/btcutil" "github.com/conformal/btcutil"
@ -21,9 +25,6 @@ import (
"github.com/conformal/btcws" "github.com/conformal/btcws"
"github.com/conformal/fastsha256" "github.com/conformal/fastsha256"
"github.com/conformal/websocket" "github.com/conformal/websocket"
"io"
"sync"
"time"
) )
const ( const (

View file

@ -10,10 +10,6 @@ import (
"encoding/binary" "encoding/binary"
"errors" "errors"
"fmt" "fmt"
"github.com/conformal/btcdb"
"github.com/conformal/btcjson"
"github.com/conformal/btcnet"
"github.com/conformal/btcwire"
"math" "math"
"net" "net"
"runtime" "runtime"
@ -21,6 +17,11 @@ import (
"sync" "sync"
"sync/atomic" "sync/atomic"
"time" "time"
"github.com/conformal/btcdb"
"github.com/conformal/btcjson"
"github.com/conformal/btcnet"
"github.com/conformal/btcwire"
) )
const ( const (

View file

@ -6,12 +6,13 @@ package main
import ( import (
"fmt" "fmt"
"github.com/conformal/winsvc/eventlog"
"github.com/conformal/winsvc/mgr"
"github.com/conformal/winsvc/svc"
"os" "os"
"path/filepath" "path/filepath"
"time" "time"
"github.com/conformal/winsvc/eventlog"
"github.com/conformal/winsvc/mgr"
"github.com/conformal/winsvc/svc"
) )
const ( const (

View file

@ -5,14 +5,15 @@
package main package main
import ( import (
"os"
"path/filepath"
"runtime"
"github.com/conformal/btcchain" "github.com/conformal/btcchain"
"github.com/conformal/btcd/limits" "github.com/conformal/btcd/limits"
"github.com/conformal/btcdb" "github.com/conformal/btcdb"
_ "github.com/conformal/btcdb/ldb" _ "github.com/conformal/btcdb/ldb"
"github.com/conformal/btclog" "github.com/conformal/btclog"
"os"
"path/filepath"
"runtime"
) )
const ( const (

View file

@ -6,14 +6,15 @@ package main
import ( import (
"fmt" "fmt"
"os"
"path/filepath"
"github.com/conformal/btcdb" "github.com/conformal/btcdb"
_ "github.com/conformal/btcdb/ldb" _ "github.com/conformal/btcdb/ldb"
"github.com/conformal/btcnet" "github.com/conformal/btcnet"
"github.com/conformal/btcutil" "github.com/conformal/btcutil"
"github.com/conformal/btcwire" "github.com/conformal/btcwire"
"github.com/conformal/go-flags" flags "github.com/conformal/go-flags"
"os"
"path/filepath"
) )
const ( const (

View file

@ -7,14 +7,15 @@ package main
import ( import (
"encoding/binary" "encoding/binary"
"fmt" "fmt"
"io"
"sync"
"time"
"github.com/conformal/btcchain" "github.com/conformal/btcchain"
"github.com/conformal/btcdb" "github.com/conformal/btcdb"
_ "github.com/conformal/btcdb/ldb" _ "github.com/conformal/btcdb/ldb"
"github.com/conformal/btcutil" "github.com/conformal/btcutil"
"github.com/conformal/btcwire" "github.com/conformal/btcwire"
"io"
"sync"
"time"
) )
var zeroHash = btcwire.ShaHash{} var zeroHash = btcwire.ShaHash{}

View file

@ -5,15 +5,16 @@ import (
"encoding/json" "encoding/json"
"errors" "errors"
"fmt" "fmt"
"github.com/conformal/btcjson"
"github.com/conformal/btcutil"
"github.com/conformal/btcws"
"github.com/conformal/go-flags"
"github.com/davecgh/go-spew/spew"
"io/ioutil" "io/ioutil"
"os" "os"
"sort" "sort"
"strconv" "strconv"
"github.com/conformal/btcjson"
"github.com/conformal/btcutil"
"github.com/conformal/btcws"
flags "github.com/conformal/go-flags"
"github.com/davecgh/go-spew/spew"
) )
// conversionHandler is a handler that is used to convert parameters from the // conversionHandler is a handler that is used to convert parameters from the

View file

@ -2,12 +2,13 @@ package main
import ( import (
"fmt" "fmt"
"github.com/conformal/btcutil"
"github.com/conformal/go-flags"
"net" "net"
"os" "os"
"path/filepath" "path/filepath"
"strings" "strings"
"github.com/conformal/btcutil"
flags "github.com/conformal/go-flags"
) )
var ( var (

View file

@ -7,15 +7,16 @@ package main
import ( import (
"errors" "errors"
"fmt" "fmt"
"os"
"path/filepath"
"strconv"
"github.com/conformal/btcdb" "github.com/conformal/btcdb"
_ "github.com/conformal/btcdb/ldb" _ "github.com/conformal/btcdb/ldb"
"github.com/conformal/btclog" "github.com/conformal/btclog"
"github.com/conformal/btcutil" "github.com/conformal/btcutil"
"github.com/conformal/btcwire" "github.com/conformal/btcwire"
"github.com/conformal/go-flags" flags "github.com/conformal/go-flags"
"os"
"path/filepath"
"strconv"
) )
type ShaHash btcwire.ShaHash type ShaHash btcwire.ShaHash

View file

@ -6,14 +6,15 @@ package main
import ( import (
"fmt" "fmt"
"os"
"path/filepath"
"github.com/conformal/btcdb" "github.com/conformal/btcdb"
_ "github.com/conformal/btcdb/ldb" _ "github.com/conformal/btcdb/ldb"
"github.com/conformal/btcnet" "github.com/conformal/btcnet"
"github.com/conformal/btcutil" "github.com/conformal/btcutil"
"github.com/conformal/btcwire" "github.com/conformal/btcwire"
"github.com/conformal/go-flags" flags "github.com/conformal/go-flags"
"os"
"path/filepath"
) )
const ( const (

View file

@ -6,13 +6,14 @@ package main
import ( import (
"fmt" "fmt"
"os"
"path/filepath"
"github.com/conformal/btcchain" "github.com/conformal/btcchain"
"github.com/conformal/btcdb" "github.com/conformal/btcdb"
_ "github.com/conformal/btcdb/ldb" _ "github.com/conformal/btcdb/ldb"
"github.com/conformal/btcnet" "github.com/conformal/btcnet"
"github.com/conformal/btcwire" "github.com/conformal/btcwire"
"os"
"path/filepath"
) )
const blockDbNamePrefix = "blocks" const blockDbNamePrefix = "blocks"

View file

@ -6,13 +6,14 @@ package main
import ( import (
"fmt" "fmt"
"github.com/conformal/btcutil"
"github.com/conformal/go-flags"
"io/ioutil" "io/ioutil"
"os" "os"
"path/filepath" "path/filepath"
"strings" "strings"
"time" "time"
"github.com/conformal/btcutil"
flags "github.com/conformal/go-flags"
) )
type config struct { type config struct {

View file

@ -7,17 +7,18 @@ package main
import ( import (
"encoding/binary" "encoding/binary"
"errors" "errors"
"io"
"os"
"path/filepath"
"strconv"
"github.com/conformal/btcdb" "github.com/conformal/btcdb"
_ "github.com/conformal/btcdb/ldb" _ "github.com/conformal/btcdb/ldb"
"github.com/conformal/btclog" "github.com/conformal/btclog"
"github.com/conformal/btcutil" "github.com/conformal/btcutil"
"github.com/conformal/btcwire" "github.com/conformal/btcwire"
"github.com/conformal/go-flags" flags "github.com/conformal/go-flags"
"github.com/davecgh/go-spew/spew" "github.com/davecgh/go-spew/spew"
"io"
"os"
"path/filepath"
"strconv"
) )
type ShaHash btcwire.ShaHash type ShaHash btcwire.ShaHash