Skip to content

Commit

Permalink
Make package go-getable
Browse files Browse the repository at this point in the history
  • Loading branch information
sammy007 committed Jun 7, 2016
1 parent 1361eb0 commit 5935a17
Show file tree
Hide file tree
Showing 14 changed files with 42 additions and 38 deletions.
7 changes: 4 additions & 3 deletions api/server.go
Expand Up @@ -2,16 +2,17 @@ package api

import (
"encoding/json"
"github.com/gorilla/mux"
"log"
"net/http"
"strings"
"sync"
"sync/atomic"
"time"

"../storage"
"../util"
"github.com/gorilla/mux"

"github.com/sammy007/open-ethereum-pool/storage"
"github.com/sammy007/open-ethereum-pool/util"
)

type ApiConfig struct {
Expand Down
10 changes: 5 additions & 5 deletions main.go
Expand Up @@ -9,12 +9,12 @@ import (
"runtime"
"time"

"./api"
"./payouts"
"./proxy"
"./storage"

"github.com/yvasiyarov/gorelic"

"github.com/sammy007/open-ethereum-pool/api"
"github.com/sammy007/open-ethereum-pool/payouts"
"github.com/sammy007/open-ethereum-pool/proxy"
"github.com/sammy007/open-ethereum-pool/storage"
)

var cfg proxy.Config
Expand Down
8 changes: 4 additions & 4 deletions payouts/payer.go
Expand Up @@ -8,11 +8,11 @@ import (
"strconv"
"time"

"../rpc"
"../storage"
"../util"

"github.com/ethereum/go-ethereum/common"

"github.com/sammy007/open-ethereum-pool/rpc"
"github.com/sammy007/open-ethereum-pool/storage"
"github.com/sammy007/open-ethereum-pool/util"
)

type PayoutsConfig struct {
Expand Down
8 changes: 4 additions & 4 deletions payouts/unlocker.go
Expand Up @@ -8,11 +8,11 @@ import (
"strings"
"time"

"../rpc"
"../storage"
"../util"

"github.com/ethereum/go-ethereum/common"

"github.com/sammy007/open-ethereum-pool/rpc"
"github.com/sammy007/open-ethereum-pool/storage"
"github.com/sammy007/open-ethereum-pool/util"
)

type UnlockerConfig struct {
Expand Down
5 changes: 3 additions & 2 deletions payouts/unlocker_test.go
@@ -1,11 +1,12 @@
package payouts

import (
"../rpc"
"../storage"
"math/big"
"os"
"testing"

"github.com/sammy007/open-ethereum-pool/rpc"
"github.com/sammy007/open-ethereum-pool/storage"
)

func TestMain(m *testing.M) {
Expand Down
4 changes: 2 additions & 2 deletions policy/policy.go
Expand Up @@ -9,8 +9,8 @@ import (
"sync/atomic"
"time"

"../storage"
"../util"
"github.com/sammy007/open-ethereum-pool/storage"
"github.com/sammy007/open-ethereum-pool/util"
)

type Config struct {
Expand Down
6 changes: 3 additions & 3 deletions proxy/blocks.go
Expand Up @@ -7,10 +7,10 @@ import (
"strings"
"sync"

"../rpc"
"../util"

"github.com/ethereum/go-ethereum/common"

"github.com/sammy007/open-ethereum-pool/rpc"
"github.com/sammy007/open-ethereum-pool/util"
)

const maxBacklog = 3
Expand Down
8 changes: 4 additions & 4 deletions proxy/config.go
@@ -1,10 +1,10 @@
package proxy

import (
"../api"
"../payouts"
"../policy"
"../storage"
"github.com/sammy007/open-ethereum-pool/api"
"github.com/sammy007/open-ethereum-pool/payouts"
"github.com/sammy007/open-ethereum-pool/policy"
"github.com/sammy007/open-ethereum-pool/storage"
)

type Config struct {
Expand Down
4 changes: 2 additions & 2 deletions proxy/handlers.go
Expand Up @@ -5,8 +5,8 @@ import (
"regexp"
"strings"

"../rpc"
"../util"
"github.com/sammy007/open-ethereum-pool/rpc"
"github.com/sammy007/open-ethereum-pool/util"
)

// Allow only lowercase hexadecimal with 0x prefix
Expand Down
11 changes: 6 additions & 5 deletions proxy/proxy.go
Expand Up @@ -2,7 +2,6 @@ package proxy

import (
"encoding/json"
"github.com/gorilla/mux"
"io"
"log"
"net"
Expand All @@ -12,10 +11,12 @@ import (
"sync/atomic"
"time"

"../policy"
"../rpc"
"../storage"
"../util"
"github.com/gorilla/mux"

"github.com/sammy007/open-ethereum-pool/policy"
"github.com/sammy007/open-ethereum-pool/rpc"
"github.com/sammy007/open-ethereum-pool/storage"
"github.com/sammy007/open-ethereum-pool/util"
)

type ProxyServer struct {
Expand Down
2 changes: 1 addition & 1 deletion proxy/stratum.go
Expand Up @@ -9,7 +9,7 @@ import (
"net"
"time"

"../util"
"github.com/sammy007/open-ethereum-pool/util"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion rpc/rpc.go
Expand Up @@ -15,7 +15,7 @@ import (

"github.com/ethereum/go-ethereum/common"

"../util"
"github.com/sammy007/open-ethereum-pool/util"
)

type RPCClient struct {
Expand Down
2 changes: 1 addition & 1 deletion storage/redis.go
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/ethereum/go-ethereum/common"
"gopkg.in/redis.v3"

"../util"
"github.com/sammy007/open-ethereum-pool/util"
)

type Config struct {
Expand Down
3 changes: 2 additions & 1 deletion storage/redis_test.go
@@ -1,10 +1,11 @@
package storage

import (
"gopkg.in/redis.v3"
"os"
"strconv"
"testing"

"gopkg.in/redis.v3"
)

var r *RedisClient
Expand Down

0 comments on commit 5935a17

Please sign in to comment.