goimports -w .

This commit is contained in:
Dave Collins 2014-07-02 19:47:24 -05:00
parent b40f5a1b24
commit efb92fcc99
17 changed files with 44 additions and 27 deletions

View file

@ -8,17 +8,18 @@ import (
"compress/bzip2" "compress/bzip2"
"encoding/binary" "encoding/binary"
"fmt" "fmt"
"io"
"os"
"path/filepath"
"strings"
"testing"
"github.com/conformal/btcdb" "github.com/conformal/btcdb"
_ "github.com/conformal/btcdb/ldb" _ "github.com/conformal/btcdb/ldb"
_ "github.com/conformal/btcdb/memdb" _ "github.com/conformal/btcdb/memdb"
"github.com/conformal/btcnet" "github.com/conformal/btcnet"
"github.com/conformal/btcutil" "github.com/conformal/btcutil"
"github.com/conformal/btcwire" "github.com/conformal/btcwire"
"io"
"os"
"path/filepath"
"strings"
"testing"
) )
var ( var (

1
db.go
View file

@ -6,6 +6,7 @@ package btcdb
import ( import (
"errors" "errors"
"github.com/conformal/btcutil" "github.com/conformal/btcutil"
"github.com/conformal/btcwire" "github.com/conformal/btcwire"
) )

View file

@ -6,8 +6,9 @@ package btcdb_test
import ( import (
"fmt" "fmt"
"github.com/conformal/btcdb"
"testing" "testing"
"github.com/conformal/btcdb"
) )
var ( var (

View file

@ -5,12 +5,13 @@
package btcdb_test package btcdb_test
import ( import (
"reflect"
"testing"
"github.com/conformal/btcdb" "github.com/conformal/btcdb"
"github.com/conformal/btcutil" "github.com/conformal/btcutil"
"github.com/conformal/btcwire" "github.com/conformal/btcwire"
"github.com/davecgh/go-spew/spew" "github.com/davecgh/go-spew/spew"
"reflect"
"testing"
) )
// testContext is used to store context information about a running test which // testContext is used to store context information about a running test which

View file

@ -8,6 +8,7 @@ import (
"bytes" "bytes"
"encoding/binary" "encoding/binary"
"fmt" "fmt"
"github.com/conformal/btcdb" "github.com/conformal/btcdb"
"github.com/conformal/btcutil" "github.com/conformal/btcutil"
"github.com/conformal/btcwire" "github.com/conformal/btcwire"

View file

@ -5,10 +5,11 @@
package ldb_test package ldb_test
import ( import (
"github.com/conformal/btcdb"
"github.com/conformal/btcwire"
"os" "os"
"testing" "testing"
"github.com/conformal/btcdb"
"github.com/conformal/btcwire"
) )
// we need to test for empty databas and make certain it returns proper value // we need to test for empty databas and make certain it returns proper value

View file

@ -3,6 +3,7 @@ package main
import ( import (
"fmt" "fmt"
"github.com/conformal/goleveldb/leveldb" "github.com/conformal/goleveldb/leveldb"
"github.com/conformal/goleveldb/leveldb/opt" "github.com/conformal/goleveldb/leveldb/opt"
) )

View file

@ -6,12 +6,13 @@ package ldb_test
import ( import (
"fmt" "fmt"
"github.com/conformal/btcdb"
"github.com/conformal/btcutil"
"github.com/conformal/btcwire"
"os" "os"
"path/filepath" "path/filepath"
"testing" "testing"
"github.com/conformal/btcdb"
"github.com/conformal/btcutil"
"github.com/conformal/btcwire"
) )
func Test_dupTx(t *testing.T) { func Test_dupTx(t *testing.T) {

View file

@ -6,13 +6,14 @@ package ldb_test
import ( import (
"fmt" "fmt"
"os"
"path/filepath"
"testing"
"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"
"os"
"path/filepath"
"testing"
) )
var tstBlocks []*btcutil.Block var tstBlocks []*btcutil.Block

View file

@ -6,6 +6,7 @@ package ldb
import ( import (
"fmt" "fmt"
"github.com/conformal/btcdb" "github.com/conformal/btcdb"
"github.com/conformal/btcwire" "github.com/conformal/btcwire"
) )

View file

@ -7,6 +7,9 @@ package ldb
import ( import (
"encoding/binary" "encoding/binary"
"fmt" "fmt"
"os"
"sync"
"github.com/conformal/btcdb" "github.com/conformal/btcdb"
"github.com/conformal/btclog" "github.com/conformal/btclog"
"github.com/conformal/btcutil" "github.com/conformal/btcutil"
@ -14,8 +17,6 @@ import (
"github.com/conformal/goleveldb/leveldb" "github.com/conformal/goleveldb/leveldb"
"github.com/conformal/goleveldb/leveldb/cache" "github.com/conformal/goleveldb/leveldb/cache"
"github.com/conformal/goleveldb/leveldb/opt" "github.com/conformal/goleveldb/leveldb/opt"
"os"
"sync"
) )
const ( const (

View file

@ -8,15 +8,16 @@ import (
"compress/bzip2" "compress/bzip2"
"encoding/binary" "encoding/binary"
"fmt" "fmt"
"github.com/conformal/btcdb"
"github.com/conformal/btcnet"
"github.com/conformal/btcutil"
"github.com/conformal/btcwire"
"io" "io"
"os" "os"
"path/filepath" "path/filepath"
"strings" "strings"
"testing" "testing"
"github.com/conformal/btcdb"
"github.com/conformal/btcnet"
"github.com/conformal/btcutil"
"github.com/conformal/btcwire"
) )
var network = btcwire.MainNet var network = btcwire.MainNet

View file

@ -8,6 +8,7 @@ import (
"bytes" "bytes"
"encoding/binary" "encoding/binary"
"fmt" "fmt"
"github.com/conformal/btcdb" "github.com/conformal/btcdb"
"github.com/conformal/btcwire" "github.com/conformal/btcwire"
"github.com/conformal/goleveldb/leveldb" "github.com/conformal/goleveldb/leveldb"

3
log.go
View file

@ -6,8 +6,9 @@ package btcdb
import ( import (
"errors" "errors"
"github.com/conformal/btclog"
"io" "io"
"github.com/conformal/btclog"
) )
// log is a logger that is initialized with no output filters. This // log is a logger that is initialized with no output filters. This

View file

@ -6,6 +6,7 @@ package memdb
import ( import (
"fmt" "fmt"
"github.com/conformal/btcdb" "github.com/conformal/btcdb"
"github.com/conformal/btclog" "github.com/conformal/btclog"
) )

View file

@ -7,11 +7,12 @@ package memdb
import ( import (
"errors" "errors"
"fmt" "fmt"
"math"
"sync"
"github.com/conformal/btcdb" "github.com/conformal/btcdb"
"github.com/conformal/btcutil" "github.com/conformal/btcutil"
"github.com/conformal/btcwire" "github.com/conformal/btcwire"
"math"
"sync"
) )
// Errors that the various database functions may return. // Errors that the various database functions may return.

View file

@ -5,13 +5,14 @@
package memdb_test package memdb_test
import ( import (
"reflect"
"testing"
"github.com/conformal/btcdb" "github.com/conformal/btcdb"
"github.com/conformal/btcdb/memdb" "github.com/conformal/btcdb/memdb"
"github.com/conformal/btcnet" "github.com/conformal/btcnet"
"github.com/conformal/btcutil" "github.com/conformal/btcutil"
"github.com/conformal/btcwire" "github.com/conformal/btcwire"
"reflect"
"testing"
) )
// TestClosed ensure calling the interface functions on a closed database // TestClosed ensure calling the interface functions on a closed database