use full-qualified name as module

This commit is contained in:
Dimitri Herzog 2021-08-25 22:06:34 +02:00
parent 010275b880
commit 919512959b
60 changed files with 161 additions and 135 deletions

View File

@ -1,12 +1,13 @@
package api
import (
"blocky/util"
"encoding/json"
"net/http"
"strings"
"time"
"github.com/0xERR0R/blocky/util"
"github.com/go-chi/chi"
log "github.com/sirupsen/logrus"
)

View File

@ -1,11 +1,12 @@
package api
import (
. "blocky/helpertest"
"encoding/json"
"net/http"
"time"
. "github.com/0xERR0R/blocky/helpertest"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"

View File

@ -1,9 +1,9 @@
package api_test
import (
. "blocky/log"
"testing"
. "github.com/0xERR0R/blocky/log"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)

View File

@ -1,14 +1,14 @@
package cmd
import (
"blocky/api"
"blocky/util"
"encoding/json"
"fmt"
"net/http"
"strings"
"blocky/log"
"github.com/0xERR0R/blocky/api"
"github.com/0xERR0R/blocky/log"
"github.com/0xERR0R/blocky/util"
"github.com/spf13/cobra"
)

View File

@ -1,13 +1,14 @@
package cmd
import (
"blocky/api"
"encoding/json"
"net/http"
"net/http/httptest"
"net/url"
"strconv"
"github.com/0xERR0R/blocky/api"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)

View File

@ -1,9 +1,9 @@
package cmd
import (
. "blocky/log"
"testing"
. "github.com/0xERR0R/blocky/log"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"

View File

@ -1,11 +1,12 @@
package cmd
import (
"blocky/api"
"blocky/log"
"io/ioutil"
"net/http"
"github.com/0xERR0R/blocky/api"
"github.com/0xERR0R/blocky/log"
"github.com/spf13/cobra"
)

View File

@ -1,14 +1,14 @@
package cmd
import (
"blocky/api"
"blocky/util"
"bytes"
"encoding/json"
"io/ioutil"
"net/http"
"blocky/log"
"github.com/0xERR0R/blocky/api"
"github.com/0xERR0R/blocky/log"
"github.com/0xERR0R/blocky/util"
"github.com/miekg/dns"
"github.com/spf13/cobra"

View File

@ -1,11 +1,12 @@
package cmd
import (
"blocky/api"
"encoding/json"
"net/http"
"net/http/httptest"
"github.com/0xERR0R/blocky/api"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)

View File

@ -1,14 +1,15 @@
package cmd
import (
"blocky/config"
"blocky/log"
"blocky/util"
"fmt"
"os"
"strconv"
"strings"
"github.com/0xERR0R/blocky/config"
"github.com/0xERR0R/blocky/log"
"github.com/0xERR0R/blocky/util"
"github.com/spf13/cobra"
)

View File

@ -1,7 +1,7 @@
package cmd
import (
"blocky/log"
"github.com/0xERR0R/blocky/log"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"

View File

@ -1,17 +1,17 @@
package cmd
import (
"blocky/config"
"blocky/evt"
"blocky/server"
"blocky/util"
"net/http"
"os"
"os/signal"
"syscall"
"time"
"blocky/log"
"github.com/0xERR0R/blocky/config"
"github.com/0xERR0R/blocky/evt"
"github.com/0xERR0R/blocky/log"
"github.com/0xERR0R/blocky/server"
"github.com/0xERR0R/blocky/util"
"github.com/spf13/cobra"
)

View File

@ -1,9 +1,10 @@
package cmd
import (
"blocky/config"
"time"
"github.com/0xERR0R/blocky/config"
. "github.com/onsi/ginkgo"
)

View File

@ -1,9 +1,9 @@
package cmd
import (
"blocky/util"
"fmt"
"github.com/0xERR0R/blocky/util"
"github.com/spf13/cobra"
)

View File

@ -10,7 +10,7 @@ import (
"strconv"
"strings"
"blocky/log"
"github.com/0xERR0R/blocky/log"
"gopkg.in/yaml.v2"
)

View File

@ -1,9 +1,9 @@
package config
import (
. "blocky/log"
"testing"
. "github.com/0xERR0R/blocky/log"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)

View File

@ -1,11 +1,11 @@
package config
import (
. "blocky/log"
"io/ioutil"
"net"
"os"
. "github.com/0xERR0R/blocky/log"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/extensions/table"
. "github.com/onsi/gomega"

2
go.mod
View File

@ -1,4 +1,4 @@
module blocky
module github.com/0xERR0R/blocky
go 1.16

View File

@ -8,7 +8,7 @@ import (
"net/http/httptest"
"os"
"blocky/log"
"github.com/0xERR0R/blocky/log"
"github.com/miekg/dns"
"github.com/onsi/gomega/types"

View File

@ -1,8 +1,6 @@
package lists
import (
"blocky/evt"
"blocky/util"
"bufio"
"errors"
"fmt"
@ -15,7 +13,9 @@ import (
"sync"
"time"
"blocky/log"
"github.com/0xERR0R/blocky/evt"
"github.com/0xERR0R/blocky/log"
"github.com/0xERR0R/blocky/util"
"github.com/sirupsen/logrus"
)

View File

@ -1,15 +1,15 @@
package lists
import (
"blocky/evt"
. "blocky/helpertest"
"net/http"
"net/http/httptest"
"os"
"sync/atomic"
"time"
"net/http/httptest"
"os"
"github.com/0xERR0R/blocky/evt"
. "github.com/0xERR0R/blocky/helpertest"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)

View File

@ -1,9 +1,10 @@
package lists
import (
. "blocky/log"
"testing"
. "github.com/0xERR0R/blocky/log"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)

View File

@ -1,8 +1,9 @@
package main
import (
"blocky/cmd"
"os"
"github.com/0xERR0R/blocky/cmd"
)
func main() {

View File

@ -1,7 +1,7 @@
package metrics
import (
"blocky/config"
"github.com/0xERR0R/blocky/config"
"github.com/go-chi/chi"
"github.com/prometheus/client_golang/prometheus"

View File

@ -1,12 +1,12 @@
package metrics
import (
"blocky/evt"
"blocky/lists"
"blocky/util"
"fmt"
"time"
"fmt"
"github.com/0xERR0R/blocky/evt"
"github.com/0xERR0R/blocky/lists"
"github.com/0xERR0R/blocky/util"
"github.com/prometheus/client_golang/prometheus"
)

View File

@ -1,18 +1,18 @@
package resolver
import (
"blocky/api"
"blocky/config"
"blocky/evt"
"blocky/lists"
"blocky/util"
"fmt"
"net"
"sort"
"strings"
"time"
"blocky/log"
"github.com/0xERR0R/blocky/api"
"github.com/0xERR0R/blocky/config"
"github.com/0xERR0R/blocky/evt"
"github.com/0xERR0R/blocky/lists"
"github.com/0xERR0R/blocky/log"
"github.com/0xERR0R/blocky/util"
"github.com/miekg/dns"
"github.com/sirupsen/logrus"

View File

@ -1,12 +1,12 @@
package resolver
import (
"blocky/config"
. "blocky/evt"
. "blocky/helpertest"
"blocky/lists"
. "blocky/log"
"blocky/util"
"github.com/0xERR0R/blocky/config"
. "github.com/0xERR0R/blocky/evt"
. "github.com/0xERR0R/blocky/helpertest"
"github.com/0xERR0R/blocky/lists"
. "github.com/0xERR0R/blocky/log"
"github.com/0xERR0R/blocky/util"
"os"
"time"

View File

@ -4,9 +4,9 @@ import (
"fmt"
"time"
"blocky/config"
"blocky/evt"
"blocky/util"
"github.com/0xERR0R/blocky/config"
"github.com/0xERR0R/blocky/evt"
"github.com/0xERR0R/blocky/util"
"github.com/0xERR0R/go-cache"
"github.com/miekg/dns"

View File

@ -3,10 +3,10 @@ package resolver
import (
"time"
"blocky/config"
. "blocky/evt"
. "blocky/helpertest"
"blocky/util"
"github.com/0xERR0R/blocky/config"
. "github.com/0xERR0R/blocky/evt"
. "github.com/0xERR0R/blocky/helpertest"
"github.com/0xERR0R/blocky/util"
"github.com/0xERR0R/go-cache"
"github.com/miekg/dns"

View File

@ -1,13 +1,14 @@
package resolver
import (
"blocky/config"
"blocky/util"
"fmt"
"net"
"strings"
"time"
"github.com/0xERR0R/blocky/config"
"github.com/0xERR0R/blocky/util"
"github.com/0xERR0R/go-cache"
"github.com/miekg/dns"
"github.com/sirupsen/logrus"

View File

@ -1,12 +1,13 @@
package resolver
import (
"blocky/config"
"blocky/util"
"errors"
"fmt"
"net"
"github.com/0xERR0R/blocky/config"
"github.com/0xERR0R/blocky/util"
"github.com/miekg/dns"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"

View File

@ -1,11 +1,12 @@
package resolver
import (
"blocky/config"
"blocky/util"
"fmt"
"strings"
"github.com/0xERR0R/blocky/config"
"github.com/0xERR0R/blocky/util"
"github.com/miekg/dns"
"github.com/sirupsen/logrus"
)

View File

@ -1,10 +1,10 @@
package resolver
import (
"blocky/config"
. "blocky/helpertest"
"blocky/log"
"blocky/util"
"github.com/0xERR0R/blocky/config"
. "github.com/0xERR0R/blocky/helpertest"
"github.com/0xERR0R/blocky/log"
"github.com/0xERR0R/blocky/util"
"github.com/miekg/dns"
. "github.com/onsi/ginkgo"

View File

@ -1,12 +1,13 @@
package resolver
import (
"blocky/config"
"blocky/util"
"fmt"
"net"
"strings"
"github.com/0xERR0R/blocky/config"
"github.com/0xERR0R/blocky/util"
"github.com/miekg/dns"
"github.com/sirupsen/logrus"
)

View File

@ -1,10 +1,10 @@
package resolver
import (
"blocky/config"
. "blocky/helpertest"
"net"
"github.com/0xERR0R/blocky/config"
. "github.com/0xERR0R/blocky/helpertest"
"github.com/miekg/dns"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"

View File

@ -1,7 +1,7 @@
package resolver
import (
"blocky/util"
"github.com/0xERR0R/blocky/util"
"github.com/miekg/dns"
. "github.com/onsi/ginkgo"

View File

@ -1,12 +1,13 @@
package resolver
import (
"blocky/config"
"blocky/metrics"
"fmt"
"strings"
"time"
"github.com/0xERR0R/blocky/config"
"github.com/0xERR0R/blocky/metrics"
"github.com/miekg/dns"
"github.com/prometheus/client_golang/prometheus"
)

View File

@ -1,9 +1,10 @@
package resolver
import (
"blocky/config"
"errors"
"github.com/0xERR0R/blocky/config"
"github.com/miekg/dns"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"

View File

@ -1,8 +1,6 @@
package resolver
import (
"blocky/config"
"blocky/util"
"io/ioutil"
"net"
"net/http"
@ -10,6 +8,9 @@ import (
"strconv"
"strings"
"github.com/0xERR0R/blocky/config"
"github.com/0xERR0R/blocky/util"
"github.com/miekg/dns"
"github.com/stretchr/testify/mock"
)

View File

@ -1,13 +1,14 @@
package resolver
import (
"blocky/config"
"blocky/util"
"fmt"
"math"
"strings"
"time"
"github.com/0xERR0R/blocky/config"
"github.com/0xERR0R/blocky/util"
"github.com/mroth/weightedrand"
"github.com/sirupsen/logrus"
)

View File

@ -1,13 +1,13 @@
package resolver
import (
"blocky/config"
. "blocky/helpertest"
. "blocky/log"
"blocky/util"
"strings"
"time"
"github.com/0xERR0R/blocky/config"
. "github.com/0xERR0R/blocky/helpertest"
. "github.com/0xERR0R/blocky/log"
"github.com/0xERR0R/blocky/util"
"github.com/miekg/dns"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"

View File

@ -1,8 +1,6 @@
package resolver
import (
"blocky/config"
"blocky/util"
"encoding/csv"
"fmt"
"io"
@ -13,6 +11,9 @@ import (
"strings"
"time"
"github.com/0xERR0R/blocky/config"
"github.com/0xERR0R/blocky/util"
"github.com/miekg/dns"
"github.com/sirupsen/logrus"
)

View File

@ -1,9 +1,6 @@
package resolver
import (
"blocky/config"
. "blocky/log"
"blocky/util"
"bufio"
"encoding/csv"
"errors"
@ -14,6 +11,10 @@ import (
"path/filepath"
"time"
"github.com/0xERR0R/blocky/config"
. "github.com/0xERR0R/blocky/log"
"github.com/0xERR0R/blocky/util"
"github.com/miekg/dns"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"

View File

@ -1,13 +1,14 @@
package resolver
import (
"blocky/log"
"blocky/util"
"fmt"
"net"
"strings"
"time"
"github.com/0xERR0R/blocky/log"
"github.com/0xERR0R/blocky/util"
"github.com/miekg/dns"
"github.com/sirupsen/logrus"
)

View File

@ -1,9 +1,10 @@
package resolver_test
import (
. "blocky/log"
"testing"
. "github.com/0xERR0R/blocky/log"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)

View File

@ -1,7 +1,7 @@
package resolver
import (
"blocky/config"
"github.com/0xERR0R/blocky/config"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"

View File

@ -1,11 +1,12 @@
package resolver
import (
"blocky/stats"
"blocky/util"
"fmt"
"strings"
"github.com/0xERR0R/blocky/stats"
"github.com/0xERR0R/blocky/util"
"github.com/jedib0t/go-pretty/table"
"github.com/miekg/dns"
)

View File

@ -1,7 +1,7 @@
package resolver
import (
"blocky/util"
"github.com/0xERR0R/blocky/util"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"

View File

@ -1,8 +1,6 @@
package resolver
import (
"blocky/config"
"blocky/util"
"bytes"
"errors"
"fmt"
@ -12,6 +10,9 @@ import (
"strconv"
"time"
"github.com/0xERR0R/blocky/config"
"github.com/0xERR0R/blocky/util"
"github.com/miekg/dns"
"github.com/sirupsen/logrus"
)

View File

@ -1,14 +1,14 @@
package resolver
import (
"blocky/config"
. "blocky/helpertest"
"blocky/util"
"crypto/tls"
"fmt"
"net/http"
"time"
"github.com/0xERR0R/blocky/config"
. "github.com/0xERR0R/blocky/helpertest"
"github.com/0xERR0R/blocky/util"
"github.com/miekg/dns"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"

View File

@ -1,20 +1,20 @@
package server
import (
"blocky/api"
"blocky/config"
"blocky/log"
"blocky/metrics"
"blocky/resolver"
"fmt"
"net"
"net/http"
"runtime"
"runtime/debug"
"strings"
"time"
"blocky/util"
"fmt"
"net"
"github.com/0xERR0R/blocky/api"
"github.com/0xERR0R/blocky/config"
"github.com/0xERR0R/blocky/log"
"github.com/0xERR0R/blocky/metrics"
"github.com/0xERR0R/blocky/resolver"
"github.com/0xERR0R/blocky/util"
"github.com/go-chi/chi"
"github.com/miekg/dns"

View File

@ -1,12 +1,6 @@
package server
import (
"blocky/api"
"blocky/config"
"blocky/log"
"blocky/resolver"
"blocky/util"
"blocky/web"
"encoding/base64"
"encoding/json"
"fmt"
@ -16,6 +10,13 @@ import (
"net/http"
"strings"
"github.com/0xERR0R/blocky/api"
"github.com/0xERR0R/blocky/config"
"github.com/0xERR0R/blocky/log"
"github.com/0xERR0R/blocky/resolver"
"github.com/0xERR0R/blocky/util"
"github.com/0xERR0R/blocky/web"
"github.com/go-chi/chi"
"github.com/go-chi/chi/middleware"
"github.com/go-chi/cors"

View File

@ -1,9 +1,9 @@
package server
import (
. "blocky/log"
"testing"
. "github.com/0xERR0R/blocky/log"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)

View File

@ -1,12 +1,6 @@
package server
import (
"blocky/api"
"blocky/config"
. "blocky/helpertest"
. "blocky/log"
"blocky/resolver"
"blocky/util"
"bytes"
"encoding/base64"
"encoding/json"
@ -16,6 +10,13 @@ import (
"strings"
"time"
"github.com/0xERR0R/blocky/api"
"github.com/0xERR0R/blocky/config"
. "github.com/0xERR0R/blocky/helpertest"
. "github.com/0xERR0R/blocky/log"
"github.com/0xERR0R/blocky/resolver"
"github.com/0xERR0R/blocky/util"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"

View File

@ -1,10 +1,11 @@
package stats
import (
"blocky/util"
"strings"
"sync"
"time"
"github.com/0xERR0R/blocky/util"
)
const (

View File

@ -1,9 +1,9 @@
package stats
import (
. "blocky/log"
"testing"
. "github.com/0xERR0R/blocky/log"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)

View File

@ -1,8 +1,8 @@
package util
import (
"blocky/config"
"blocky/log"
"github.com/0xERR0R/blocky/config"
"github.com/0xERR0R/blocky/log"
"context"
"fmt"

View File

@ -1,7 +1,6 @@
package util
import (
"blocky/config"
"encoding/binary"
"fmt"
"net"
@ -10,7 +9,8 @@ import (
"sort"
"strings"
"blocky/log"
"github.com/0xERR0R/blocky/config"
"github.com/0xERR0R/blocky/log"
"github.com/miekg/dns"
"github.com/sirupsen/logrus"

View File

@ -1,7 +1,6 @@
package util
import (
. "blocky/log"
"errors"
"fmt"
"net"
@ -11,6 +10,7 @@ import (
"github.com/sirupsen/logrus"
"github.com/sirupsen/logrus/hooks/test"
. "github.com/0xERR0R/blocky/log"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)

View File

@ -1,9 +1,9 @@
package util
import (
. "blocky/log"
"testing"
. "github.com/0xERR0R/blocky/log"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)