소스 검색

Make Go module paths semantic versions

(this is required to import the packages from this module elsewhere)
Ask Bjørn Hansen 2 년 전
부모
커밋
63b1969839

+ 1 - 1
config.go

@@ -7,7 +7,7 @@ import (
 	"sync"
 	"time"
 
-	"github.com/abh/geodns/targeting/geoip2"
+	"github.com/abh/geodns/v3/targeting/geoip2"
 
 	"github.com/fsnotify/fsnotify"
 	gcfg "gopkg.in/gcfg.v1"

+ 7 - 7
geodns-logs/process-stats.go

@@ -15,8 +15,8 @@ import (
 	"github.com/prometheus/client_golang/prometheus"
 	"github.com/prometheus/client_golang/prometheus/promhttp"
 
-	"github.com/abh/geodns/countries"
-	"github.com/abh/geodns/querylog"
+	"github.com/abh/geodns/v3/countries"
+	"github.com/abh/geodns/v3/querylog"
 )
 
 // TODO:
@@ -111,11 +111,11 @@ func main() {
 }
 
 var extraValidLabels = map[string]struct{}{
-	"uk":       struct{}{},
-	"_status":  struct{}{},
-	"_country": struct{}{},
-	"www":      struct{}{},
-	"nag-test": struct{}{},
+	"uk":       {},
+	"_status":  {},
+	"_country": {},
+	"www":      {},
+	"nag-test": {},
 }
 
 func validCC(label string) bool {

+ 1 - 1
geodns-logs/stats.go

@@ -6,7 +6,7 @@ import (
 	"strings"
 	"time"
 
-	"github.com/abh/geodns/querylog"
+	"github.com/abh/geodns/v3/querylog"
 	"github.com/miekg/dns"
 	"github.com/prometheus/client_golang/prometheus"
 )

+ 8 - 8
geodns.go

@@ -29,14 +29,14 @@ import (
 	"strings"
 	"time"
 
-	"github.com/abh/geodns/applog"
-	"github.com/abh/geodns/health"
-	"github.com/abh/geodns/monitor"
-	"github.com/abh/geodns/querylog"
-	"github.com/abh/geodns/server"
-	"github.com/abh/geodns/targeting"
-	"github.com/abh/geodns/targeting/geoip2"
-	"github.com/abh/geodns/zones"
+	"github.com/abh/geodns/v3/applog"
+	"github.com/abh/geodns/v3/health"
+	"github.com/abh/geodns/v3/monitor"
+	"github.com/abh/geodns/v3/querylog"
+	"github.com/abh/geodns/v3/server"
+	"github.com/abh/geodns/v3/targeting"
+	"github.com/abh/geodns/v3/targeting/geoip2"
+	"github.com/abh/geodns/v3/zones"
 	"github.com/pborman/uuid"
 )
 

+ 1 - 1
go.mod

@@ -1,4 +1,4 @@
-module github.com/abh/geodns
+module github.com/abh/geodns/v3
 
 go 1.18
 

+ 1 - 1
health/health.go

@@ -3,7 +3,7 @@ package health
 import (
 	"fmt"
 
-	"github.com/abh/geodns/typeutil"
+	"github.com/abh/geodns/v3/typeutil"
 )
 
 type HealthTester interface {

+ 2 - 2
health/healthtest/healthtest.go

@@ -7,8 +7,8 @@ import (
 	"sync"
 	"time"
 
-	"github.com/abh/geodns/applog"
-	"github.com/abh/geodns/typeutil"
+	"github.com/abh/geodns/v3/applog"
+	"github.com/abh/geodns/v3/typeutil"
 
 	"github.com/miekg/dns"
 )

+ 2 - 2
health/healthtest/healthtesters.go

@@ -16,8 +16,8 @@ import (
 	"strings"
 	"time"
 
-	"github.com/abh/geodns/applog"
-	"github.com/abh/geodns/typeutil"
+	"github.com/abh/geodns/v3/applog"
+	"github.com/abh/geodns/v3/typeutil"
 )
 
 /*

+ 2 - 2
http.go

@@ -7,8 +7,8 @@ import (
 	"net/http"
 	"strconv"
 
-	"github.com/abh/geodns/monitor"
-	"github.com/abh/geodns/zones"
+	"github.com/abh/geodns/v3/monitor"
+	"github.com/abh/geodns/v3/zones"
 	"github.com/prometheus/client_golang/prometheus/promhttp"
 )
 

+ 3 - 3
http_test.go

@@ -9,9 +9,9 @@ import (
 
 	"github.com/stretchr/testify/require"
 
-	"github.com/abh/geodns/targeting"
-	"github.com/abh/geodns/targeting/geoip2"
-	"github.com/abh/geodns/zones"
+	"github.com/abh/geodns/v3/targeting"
+	"github.com/abh/geodns/v3/targeting/geoip2"
+	"github.com/abh/geodns/v3/zones"
 )
 
 func TestHTTP(t *testing.T) {

+ 4 - 4
server/serve.go

@@ -10,10 +10,10 @@ import (
 	"strings"
 	"time"
 
-	"github.com/abh/geodns/applog"
-	"github.com/abh/geodns/edns"
-	"github.com/abh/geodns/querylog"
-	"github.com/abh/geodns/zones"
+	"github.com/abh/geodns/v3/applog"
+	"github.com/abh/geodns/v3/edns"
+	"github.com/abh/geodns/v3/querylog"
+	"github.com/abh/geodns/v3/zones"
 
 	"github.com/miekg/dns"
 	"github.com/prometheus/client_golang/prometheus"

+ 2 - 2
server/serve_test.go

@@ -10,8 +10,8 @@ import (
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
 
-	"github.com/abh/geodns/monitor"
-	"github.com/abh/geodns/zones"
+	"github.com/abh/geodns/v3/monitor"
+	"github.com/abh/geodns/v3/zones"
 	"github.com/miekg/dns"
 )
 

+ 3 - 3
server/server.go

@@ -3,9 +3,9 @@ package server
 import (
 	"log"
 
-	"github.com/abh/geodns/monitor"
-	"github.com/abh/geodns/querylog"
-	"github.com/abh/geodns/zones"
+	"github.com/abh/geodns/v3/monitor"
+	"github.com/abh/geodns/v3/querylog"
+	"github.com/abh/geodns/v3/zones"
 
 	"github.com/miekg/dns"
 	"github.com/prometheus/client_golang/prometheus"

+ 2 - 2
targeting/geoip2/geoip2.go

@@ -11,8 +11,8 @@ import (
 	"sync"
 	"time"
 
-	"github.com/abh/geodns/countries"
-	"github.com/abh/geodns/targeting/geo"
+	"github.com/abh/geodns/v3/countries"
+	"github.com/abh/geodns/v3/targeting/geo"
 	gdb "github.com/oschwald/geoip2-golang"
 )
 

+ 1 - 1
targeting/targeting.go

@@ -6,7 +6,7 @@ import (
 	"net"
 	"strings"
 
-	"github.com/abh/geodns/targeting/geo"
+	"github.com/abh/geodns/v3/targeting/geo"
 )
 
 type TargetOptions int

+ 1 - 1
targeting/targeting_test.go

@@ -5,7 +5,7 @@ import (
 	"reflect"
 	"testing"
 
-	"github.com/abh/geodns/targeting/geoip2"
+	"github.com/abh/geodns/v3/targeting/geoip2"
 )
 
 func TestTargetString(t *testing.T) {

+ 2 - 2
zones/picker.go

@@ -3,8 +3,8 @@ package zones
 import (
 	"math/rand"
 
-	"github.com/abh/geodns/health"
-	"github.com/abh/geodns/targeting/geo"
+	"github.com/abh/geodns/v3/health"
+	"github.com/abh/geodns/v3/targeting/geo"
 
 	"github.com/miekg/dns"
 )

+ 2 - 2
zones/reader.go

@@ -11,8 +11,8 @@ import (
 	"strconv"
 	"strings"
 
-	"github.com/abh/geodns/targeting"
-	"github.com/abh/geodns/typeutil"
+	"github.com/abh/geodns/v3/targeting"
+	"github.com/abh/geodns/v3/typeutil"
 
 	"github.com/abh/errorutil"
 	"github.com/miekg/dns"

+ 2 - 2
zones/reader_test.go

@@ -7,8 +7,8 @@ import (
 	"os"
 	"testing"
 
-	"github.com/abh/geodns/targeting"
-	"github.com/abh/geodns/targeting/geoip2"
+	"github.com/abh/geodns/v3/targeting"
+	"github.com/abh/geodns/v3/targeting/geoip2"
 	"github.com/stretchr/testify/assert"
 )
 

+ 4 - 4
zones/zone.go

@@ -8,10 +8,10 @@ import (
 	"strings"
 	"sync"
 
-	"github.com/abh/geodns/applog"
-	"github.com/abh/geodns/health"
-	"github.com/abh/geodns/targeting"
-	"github.com/abh/geodns/targeting/geo"
+	"github.com/abh/geodns/v3/applog"
+	"github.com/abh/geodns/v3/health"
+	"github.com/abh/geodns/v3/targeting"
+	"github.com/abh/geodns/v3/targeting/geo"
 
 	"github.com/miekg/dns"
 )

+ 1 - 1
zones/zone_health_test.go

@@ -4,7 +4,7 @@ import (
 	"math/rand"
 	"testing"
 
-	"github.com/abh/geodns/health"
+	"github.com/abh/geodns/v3/health"
 	"github.com/miekg/dns"
 )