1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

Internals: Switch to v2 go.mod, drop GOPATH, and fix Azure Pipelines (#595)

* Switched to v2 go.mod

Also set GO111MODULE=on in build stuff to always use Go modules
even when in GOPATH.

* Ensure go.mod, go.sum, and vendor are up to date

* Attempt to fix Azure pipelines

* Add set -e to properly fail on exit (it didn't seem to be
  propagating properly before).
* Set workingDirectory for GoFmt and GoGen (this might be why it
  fails unlike compile and unitests).

* Another attempt to fix Azure Pipelines

* Use the Go env template for all go-related jobs.

* Completely fixed Azure Pipelines

* Added a display name to GoFmt for consistency.
* Fixed diffs for GoFmt and GoGen.
* Show git status for checks.

* Drop GOPATH for tests

TODO: Do the same for integration tests.

* Drop GOPATH for integration tests

* Show more diffs

* Regenerate provider support matrix

This wasn't done in #590...
This commit is contained in:
Patrick Gaskin
2020-01-28 10:42:31 -05:00
committed by Tom Limoncelli
parent d19eedaa63
commit 2f83aa9302
74 changed files with 244 additions and 205 deletions

View File

@ -6,8 +6,8 @@ go:
install: pwd
script:
- go run build/validate/validate.go
- go test ./...
- go run -mod=readonly build/validate/validate.go
- go test -mod=readonly ./...
notifications:
email:

View File

@ -2,7 +2,7 @@ FROM golang:1.13-alpine AS build-env
WORKDIR /go/src/github.com/StackExchange/dnscontrol
ADD . .
RUN apk update && apk add git
RUN go run build/build.go -os=linux
RUN GO111MODULE=on go run build/build.go -os=linux
RUN cp dnscontrol-Linux /go/bin/dnscontrol
RUN dnscontrol version
RUN go build -o cmd/convertzone/convertzone cmd/convertzone/main.go

View File

@ -1,9 +1,3 @@
variables:
GOBIN: '$(GOPATH)/bin' # Go binaries path
GOROOT: '/usr/local/go1.13' # Go installation path
GOPATH: '$(system.defaultWorkingDirectory)/gopath' # Go workspace path
modulePath: '$(GOPATH)/src/github.com/$(build.repository.name)' # Path to the module's code
trigger:
batch: "true"
branches:
@ -24,27 +18,53 @@ jobs:
OS: linux
steps:
- template: build/azure-pipelines/go-env.yaml
- script: "go run build/build.go -os $(OS)"
workingDirectory: '$(modulePath)'
- script: "go run -mod=readonly build/build.go -os $(OS)"
- job: "unittests"
displayName: "Run Unit Tests"
steps:
- template: build/azure-pipelines/go-env.yaml
- script: "go test ./..."
workingDirectory: '$(modulePath)'
- script: "go test -mod=readonly ./..."
- job: "modtidy"
displayName: "Check Go Modules"
steps:
- template: build/azure-pipelines/go-env.yaml
- script: |
set -e
go mod tidy
git status --porcelain
git diff
[ ! -n "$(git status --porcelain go.mod go.sum)" ] || { echo "Error: go.mod/go.sum outdated, please run go mod tidy."; false; }
- job: "modvendor"
displayName: "Check Go Vendor"
steps:
- template: build/azure-pipelines/go-env.yaml
- script: |
set -e
go mod vendor
git status --porcelain
[ ! -n "$(git status --porcelain vendor)" ] || { echo "Error: Vendor does not match go.mod/go.sum, please run go mod vendor."; false; }
- job: "GoFmt"
displayName: "Check Go Formatting"
steps:
- template: build/azure-pipelines/go-env.yaml
- script: |
set -e
go fmt ./...
git status --porcelain
git diff
git diff --exit-code
[ ! -n "$(git status --porcelain)" ] || { echo "Error: Go files not formatted, please run go fmt ./... ."; false; }
- job: "GoGen"
displayName: "Check Go Generate"
steps:
- template: build/azure-pipelines/go-env.yaml
- script: |
set -e
go generate .
git status --porcelain
git diff
git diff --exit-code
[ ! -n "$(git status --porcelain)" ] || { echo "Error: Generated files not up to date, please run go generate . ."; false; }

View File

@ -10,11 +10,13 @@ if ($SHA -eq ""){
$PKG = "github.com/StackExchange/dnscontrol"
$DATE = [int][double]::Parse((Get-Date -UFormat %s))
$FLAGS="-s -w -X main.SHA=$SHA -X main.BuildTime=$DATE"
$FLAGS="-mod=readonly -s -w -X main.SHA=$SHA -X main.BuildTime=$DATE"
Write-Host $FLAGS
$OrigGOOS = $env:GOOS
$env:GO111MODULE = "on"
Write-Host 'Building Linux'
$env:GOOS = "linux"
go build -o dnscontrol-Linux -ldflags "$FLAGS" $PKG

View File

@ -1,12 +1,6 @@
# shared step for setting up go env
# see https://docs.microsoft.com/en-us/azure/devops/pipelines/languages/go?view=azure-devops#build-a-container-image
steps:
- script: |
mkdir -p '$(GOBIN)'
mkdir -p '$(GOPATH)/pkg'
mkdir -p '$(modulePath)'
shopt -s extglob
mv !(gopath) '$(modulePath)'
echo '##vso[task.prependpath]$(GOBIN)'
echo '##vso[task.prependpath]$(GOROOT)/bin'
displayName: 'Set up the Go workspace'
- task: GoTool@0
inputs:
version: '1.13.6'

View File

@ -1,9 +1,5 @@
variables:
GOBIN: '$(GOPATH)/bin' # Go binaries path
GOROOT: '/usr/local/go1.13' # Go installation path
GOPATH: '$(system.defaultWorkingDirectory)/gopath' # Go workspace path
modulePath: '$(GOPATH)/src/github.com/$(build.repository.name)' # Path to the module's code
wd: '$(modulePath)/integrationTest'
wd: '$(System.DefaultWorkingDirectory)/integrationTest'
trigger:
batch: "true"

View File

@ -17,12 +17,13 @@ var goos = flag.String("os", "", "OS to build (linux, windows, or darwin) Defaul
func main() {
flag.Parse()
flags := fmt.Sprintf(`-s -w -X main.SHA="%s" -X main.BuildTime=%d`, getVersion(), time.Now().Unix())
pkg := "github.com/StackExchange/dnscontrol"
pkg := "github.com/StackExchange/dnscontrol/v2"
build := func(out, goos string) {
log.Printf("Building %s", out)
cmd := exec.Command("go", "build", "-o", out, "-ldflags", flags, pkg)
os.Setenv("GOOS", goos)
os.Setenv("GO111MODULE", "on")
cmd.Stderr = os.Stderr
cmd.Stdout = os.Stdout
err := cmd.Run()

View File

@ -6,8 +6,8 @@ import (
"io/ioutil"
"sort"
"github.com/StackExchange/dnscontrol/providers"
_ "github.com/StackExchange/dnscontrol/providers/_all"
"github.com/StackExchange/dnscontrol/v2/providers"
_ "github.com/StackExchange/dnscontrol/v2/providers/_all"
)
func generateFeatureMatrix() error {

View File

@ -43,8 +43,8 @@ import (
"strconv"
"strings"
"github.com/StackExchange/dnscontrol/providers/bind"
"github.com/StackExchange/dnscontrol/providers/octodns/octoyaml"
"github.com/StackExchange/dnscontrol/v2/providers/bind"
"github.com/StackExchange/dnscontrol/v2/providers/octodns/octoyaml"
"github.com/miekg/dns"
"github.com/miekg/dns/dnsutil"
"github.com/pkg/errors"

View File

@ -7,8 +7,8 @@ import (
"sort"
"strings"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/pkg/printer"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/pkg/printer"
"github.com/pkg/errors"
"github.com/urfave/cli"
)

View File

@ -3,7 +3,7 @@ package commands
import (
"fmt"
"github.com/StackExchange/dnscontrol/providers"
"github.com/StackExchange/dnscontrol/v2/providers"
"github.com/urfave/cli"
)

View File

@ -7,10 +7,10 @@ import (
"regexp"
"strings"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/pkg/acme"
"github.com/StackExchange/dnscontrol/pkg/normalize"
"github.com/StackExchange/dnscontrol/pkg/printer"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/pkg/acme"
"github.com/StackExchange/dnscontrol/v2/pkg/normalize"
"github.com/StackExchange/dnscontrol/v2/pkg/printer"
"github.com/urfave/cli"
)

View File

@ -5,13 +5,13 @@ import (
"log"
"os"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/pkg/nameservers"
"github.com/StackExchange/dnscontrol/pkg/normalize"
"github.com/StackExchange/dnscontrol/pkg/notifications"
"github.com/StackExchange/dnscontrol/pkg/printer"
"github.com/StackExchange/dnscontrol/providers"
"github.com/StackExchange/dnscontrol/providers/config"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/pkg/nameservers"
"github.com/StackExchange/dnscontrol/v2/pkg/normalize"
"github.com/StackExchange/dnscontrol/v2/pkg/notifications"
"github.com/StackExchange/dnscontrol/v2/pkg/printer"
"github.com/StackExchange/dnscontrol/v2/providers"
"github.com/StackExchange/dnscontrol/v2/providers/config"
"github.com/pkg/errors"
"github.com/urfave/cli"
)

View File

@ -5,9 +5,9 @@ import (
"fmt"
"os"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/pkg/js"
"github.com/StackExchange/dnscontrol/pkg/normalize"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/pkg/js"
"github.com/StackExchange/dnscontrol/v2/pkg/normalize"
"github.com/pkg/errors"
"github.com/urfave/cli"
)

View File

@ -19,6 +19,7 @@
<th class="rotate"><div><span>GANDI_V5</span></div></th>
<th class="rotate"><div><span>GCLOUD</span></div></th>
<th class="rotate"><div><span>HEXONET</span></div></th>
<th class="rotate"><div><span>INTERNETBS</span></div></th>
<th class="rotate"><div><span>LINODE</span></div></th>
<th class="rotate"><div><span>NAMECHEAP</span></div></th>
<th class="rotate"><div><span>NAMEDOTCOM</span></div></th>
@ -79,6 +80,9 @@
<td class="danger">
<i class="fa fa-times text-danger" aria-hidden="true"></i>
</td>
<td class="danger">
<i class="fa fa-times text-danger" aria-hidden="true"></i>
</td>
<td class="success">
<i class="fa fa-check text-success" aria-hidden="true"></i>
</td>
@ -145,6 +149,9 @@
<td class="success">
<i class="fa fa-check text-success" aria-hidden="true"></i>
</td>
<td class="danger">
<i class="fa fa-times text-danger" aria-hidden="true"></i>
</td>
<td class="success">
<i class="fa fa-check text-success" aria-hidden="true"></i>
</td>
@ -217,6 +224,9 @@
<td class="success">
<i class="fa fa-check text-success" aria-hidden="true"></i>
</td>
<td class="success">
<i class="fa fa-check text-success" aria-hidden="true"></i>
</td>
<td class="danger">
<i class="fa fa-times text-danger" aria-hidden="true"></i>
</td>
@ -278,6 +288,7 @@
<i class="fa has-tooltip fa-times text-danger" aria-hidden="true"></i>
</td>
<td><i class="fa fa-minus dim"></i></td>
<td><i class="fa fa-minus dim"></i></td>
<td class="danger">
<i class="fa fa-times text-danger" aria-hidden="true"></i>
</td>
@ -340,6 +351,7 @@
<i class="fa fa-check text-success" aria-hidden="true"></i>
</td>
<td><i class="fa fa-minus dim"></i></td>
<td><i class="fa fa-minus dim"></i></td>
<td class="danger">
<i class="fa fa-times text-danger" aria-hidden="true"></i>
</td>
@ -398,6 +410,7 @@
<i class="fa fa-check text-success" aria-hidden="true"></i>
</td>
<td><i class="fa fa-minus dim"></i></td>
<td><i class="fa fa-minus dim"></i></td>
<td class="danger">
<i class="fa fa-times text-danger" aria-hidden="true"></i>
</td>
@ -449,6 +462,7 @@
<td><i class="fa fa-minus dim"></i></td>
<td><i class="fa fa-minus dim"></i></td>
<td><i class="fa fa-minus dim"></i></td>
<td><i class="fa fa-minus dim"></i></td>
</tr>
<tr>
<th class="row-header" style="text-decoration: underline;" data-toggle="tooltip" data-container="body" data-placement="top" title="Driver has explicitly implemented SRV record management">SRV</th>
@ -492,6 +506,7 @@
<i class="fa fa-check text-success" aria-hidden="true"></i>
</td>
<td><i class="fa fa-minus dim"></i></td>
<td><i class="fa fa-minus dim"></i></td>
<td class="danger" data-toggle="tooltip" data-container="body" data-placement="top" title="The namecheap web console allows you to make SRV records, but their api does not let you read or set them">
<i class="fa has-tooltip fa-times text-danger" aria-hidden="true"></i>
</td>
@ -547,6 +562,7 @@
<td><i class="fa fa-minus dim"></i></td>
<td><i class="fa fa-minus dim"></i></td>
<td><i class="fa fa-minus dim"></i></td>
<td><i class="fa fa-minus dim"></i></td>
<td class="success">
<i class="fa fa-check text-success" aria-hidden="true"></i>
</td>
@ -586,6 +602,7 @@
<i class="fa fa-check text-success" aria-hidden="true"></i>
</td>
<td><i class="fa fa-minus dim"></i></td>
<td><i class="fa fa-minus dim"></i></td>
<td class="danger">
<i class="fa fa-times text-danger" aria-hidden="true"></i>
</td>
@ -629,6 +646,7 @@
</td>
<td><i class="fa fa-minus dim"></i></td>
<td><i class="fa fa-minus dim"></i></td>
<td><i class="fa fa-minus dim"></i></td>
<td class="danger">
<i class="fa fa-times text-danger" aria-hidden="true"></i>
</td>
@ -668,6 +686,7 @@
<td><i class="fa fa-minus dim"></i></td>
<td><i class="fa fa-minus dim"></i></td>
<td><i class="fa fa-minus dim"></i></td>
<td><i class="fa fa-minus dim"></i></td>
<td class="success">
<i class="fa fa-check text-success" aria-hidden="true"></i>
</td>
@ -707,6 +726,7 @@
<td class="success">
<i class="fa fa-check text-success" aria-hidden="true"></i>
</td>
<td><i class="fa fa-minus dim"></i></td>
<td class="danger">
<i class="fa fa-times text-danger" aria-hidden="true"></i>
</td>
@ -776,6 +796,9 @@
<td class="danger">
<i class="fa fa-times text-danger" aria-hidden="true"></i>
</td>
<td class="danger">
<i class="fa fa-times text-danger" aria-hidden="true"></i>
</td>
<td class="danger" data-toggle="tooltip" data-container="body" data-placement="top" title="Requires domain registered through their service">
<i class="fa has-tooltip fa-times text-danger" aria-hidden="true"></i>
</td>
@ -848,6 +871,9 @@
<td class="success">
<i class="fa fa-check text-success" aria-hidden="true"></i>
</td>
<td class="success">
<i class="fa fa-check text-success" aria-hidden="true"></i>
</td>
<td class="danger">
<i class="fa fa-times text-danger" aria-hidden="true"></i>
</td>

View File

@ -8,7 +8,7 @@ import (
"net/http"
"strings"
"github.com/StackExchange/dnscontrol/pkg/spflib"
"github.com/StackExchange/dnscontrol/v2/pkg/spflib"
"github.com/gopherjs/jquery"
)

2
go.mod
View File

@ -1,4 +1,4 @@
module github.com/StackExchange/dnscontrol
module github.com/StackExchange/dnscontrol/v2
go 1.13

View File

@ -9,11 +9,11 @@ import (
"strconv"
"strings"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/pkg/nameservers"
"github.com/StackExchange/dnscontrol/providers"
_ "github.com/StackExchange/dnscontrol/providers/_all"
"github.com/StackExchange/dnscontrol/providers/config"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/pkg/nameservers"
"github.com/StackExchange/dnscontrol/v2/providers"
_ "github.com/StackExchange/dnscontrol/v2/providers/_all"
"github.com/StackExchange/dnscontrol/v2/providers/config"
"github.com/miekg/dns/dnsutil"
"github.com/pkg/errors"
)

View File

@ -7,8 +7,8 @@ import (
"strconv"
"time"
"github.com/StackExchange/dnscontrol/commands"
_ "github.com/StackExchange/dnscontrol/providers/_all"
"github.com/StackExchange/dnscontrol/v2/commands"
_ "github.com/StackExchange/dnscontrol/v2/providers/_all"
)
//go:generate go run build/generate/generate.go build/generate/featureMatrix.go

View File

@ -44,7 +44,7 @@ type DNSProviderConfig struct {
// FIXME(tal): In hindsight, the Nameserver struct is overkill. We
// could have just used []string. Now every provider calls StringsToNameservers
// and ever user calls StringsToNameservers. We should refactor this
// some day. https://github.com/StackExchange/dnscontrol/issues/577
// some day. https://github.com/StackExchange/dnscontrol/v2/issues/577
// Nameserver describes a nameserver.
type Nameserver struct {

View File

@ -12,9 +12,9 @@ import (
"strings"
"time"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/pkg/nameservers"
"github.com/StackExchange/dnscontrol/pkg/notifications"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/pkg/nameservers"
"github.com/StackExchange/dnscontrol/v2/pkg/notifications"
"github.com/go-acme/lego/certcrypto"
"github.com/go-acme/lego/certificate"
"github.com/go-acme/lego/challenge"

View File

@ -7,9 +7,9 @@ import (
"path/filepath"
"strings"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/pkg/printer"
"github.com/StackExchange/dnscontrol/pkg/transform"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/pkg/printer"
"github.com/StackExchange/dnscontrol/v2/pkg/transform"
"github.com/pkg/errors"
"github.com/robertkrimen/otto" // load underscore js into vm by default
_ "github.com/robertkrimen/otto/underscore" // required by otto

View File

@ -7,7 +7,7 @@ import (
"strconv"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/v2/models"
)
// DetermineNameservers will find all nameservers we should use for a domain. It follows the following rules:
@ -35,7 +35,7 @@ func DetermineNameservers(dc *models.DomainConfig) ([]*models.Nameserver, error)
// FIXME(tlim): Rather than correct broken providers, we should print
// a warning that the provider should be updated to store the FQDN
// with no trailing dot. See also providers/namedotcom/nameservers.go
// Bug https://github.com/StackExchange/dnscontrol/issues/491
// Bug https://github.com/StackExchange/dnscontrol/v2/issues/491
ns = append(ns, nss[i])
}
}

View File

@ -5,8 +5,8 @@ import (
"github.com/pkg/errors"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/pkg/spflib"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/pkg/spflib"
)
// hasSpfRecords returns true if this record requests SPF unrolling.

View File

@ -3,7 +3,7 @@ package normalize
import (
"testing"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/v2/models"
)
func makeRC(label, domain, target string, rc models.RecordConfig) *models.RecordConfig {

View File

@ -5,9 +5,9 @@ import (
"net"
"strings"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/pkg/transform"
"github.com/StackExchange/dnscontrol/providers"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/pkg/transform"
"github.com/StackExchange/dnscontrol/v2/providers"
"github.com/miekg/dns"
"github.com/miekg/dns/dnsutil"
"github.com/pkg/errors"

View File

@ -5,7 +5,7 @@ import (
"fmt"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/v2/models"
)
func TestCheckLabel(t *testing.T) {

View File

@ -7,7 +7,7 @@ import (
"os"
"strings"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/v2/models"
)
// CLI is an abstraction around the CLI.

View File

@ -3,27 +3,27 @@ package all
import (
// Define all known providers here. They should each register themselves with the providers package via init function.
_ "github.com/StackExchange/dnscontrol/providers/activedir"
_ "github.com/StackExchange/dnscontrol/providers/azuredns"
_ "github.com/StackExchange/dnscontrol/providers/bind"
_ "github.com/StackExchange/dnscontrol/providers/cloudflare"
_ "github.com/StackExchange/dnscontrol/providers/cloudns"
_ "github.com/StackExchange/dnscontrol/providers/digitalocean"
_ "github.com/StackExchange/dnscontrol/providers/dnsimple"
_ "github.com/StackExchange/dnscontrol/providers/exoscale"
_ "github.com/StackExchange/dnscontrol/providers/gandi"
_ "github.com/StackExchange/dnscontrol/providers/gandi_v5"
_ "github.com/StackExchange/dnscontrol/providers/gcloud"
_ "github.com/StackExchange/dnscontrol/providers/hexonet"
_ "github.com/StackExchange/dnscontrol/providers/internetbs"
_ "github.com/StackExchange/dnscontrol/providers/linode"
_ "github.com/StackExchange/dnscontrol/providers/namecheap"
_ "github.com/StackExchange/dnscontrol/providers/namedotcom"
_ "github.com/StackExchange/dnscontrol/providers/ns1"
_ "github.com/StackExchange/dnscontrol/providers/octodns"
_ "github.com/StackExchange/dnscontrol/providers/opensrs"
_ "github.com/StackExchange/dnscontrol/providers/ovh"
_ "github.com/StackExchange/dnscontrol/providers/route53"
_ "github.com/StackExchange/dnscontrol/providers/softlayer"
_ "github.com/StackExchange/dnscontrol/providers/vultr"
_ "github.com/StackExchange/dnscontrol/v2/providers/activedir"
_ "github.com/StackExchange/dnscontrol/v2/providers/azuredns"
_ "github.com/StackExchange/dnscontrol/v2/providers/bind"
_ "github.com/StackExchange/dnscontrol/v2/providers/cloudflare"
_ "github.com/StackExchange/dnscontrol/v2/providers/cloudns"
_ "github.com/StackExchange/dnscontrol/v2/providers/digitalocean"
_ "github.com/StackExchange/dnscontrol/v2/providers/dnsimple"
_ "github.com/StackExchange/dnscontrol/v2/providers/exoscale"
_ "github.com/StackExchange/dnscontrol/v2/providers/gandi"
_ "github.com/StackExchange/dnscontrol/v2/providers/gandi_v5"
_ "github.com/StackExchange/dnscontrol/v2/providers/gcloud"
_ "github.com/StackExchange/dnscontrol/v2/providers/hexonet"
_ "github.com/StackExchange/dnscontrol/v2/providers/internetbs"
_ "github.com/StackExchange/dnscontrol/v2/providers/linode"
_ "github.com/StackExchange/dnscontrol/v2/providers/namecheap"
_ "github.com/StackExchange/dnscontrol/v2/providers/namedotcom"
_ "github.com/StackExchange/dnscontrol/v2/providers/ns1"
_ "github.com/StackExchange/dnscontrol/v2/providers/octodns"
_ "github.com/StackExchange/dnscontrol/v2/providers/opensrs"
_ "github.com/StackExchange/dnscontrol/v2/providers/ovh"
_ "github.com/StackExchange/dnscontrol/v2/providers/route53"
_ "github.com/StackExchange/dnscontrol/v2/providers/softlayer"
_ "github.com/StackExchange/dnscontrol/v2/providers/vultr"
)

View File

@ -5,7 +5,7 @@ import (
"fmt"
"runtime"
"github.com/StackExchange/dnscontrol/providers"
"github.com/StackExchange/dnscontrol/v2/providers"
"github.com/pkg/errors"
)

View File

@ -7,9 +7,9 @@ import (
"strings"
"time"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/pkg/printer"
"github.com/StackExchange/dnscontrol/providers/diff"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/pkg/printer"
"github.com/StackExchange/dnscontrol/v2/providers/diff"
"github.com/TomOnTime/utfutil"
"github.com/pkg/errors"
)

View File

@ -4,7 +4,7 @@ import (
"fmt"
"testing"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/v2/models"
)
func makeRC(label, domain, target string, rc models.RecordConfig) *models.RecordConfig {

View File

@ -8,9 +8,9 @@ import (
"time"
"github.com/Azure/go-autorest/autorest/to"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/providers"
"github.com/StackExchange/dnscontrol/providers/diff"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/providers"
"github.com/StackExchange/dnscontrol/v2/providers/diff"
"github.com/pkg/errors"
adns "github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns"

View File

@ -25,9 +25,9 @@ import (
"github.com/miekg/dns"
"github.com/pkg/errors"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/providers"
"github.com/StackExchange/dnscontrol/providers/diff"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/providers"
"github.com/StackExchange/dnscontrol/v2/providers/diff"
)
var features = providers.DocumentationNotes{

View File

@ -8,11 +8,11 @@ import (
"strings"
"time"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/pkg/printer"
"github.com/StackExchange/dnscontrol/pkg/transform"
"github.com/StackExchange/dnscontrol/providers"
"github.com/StackExchange/dnscontrol/providers/diff"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/pkg/printer"
"github.com/StackExchange/dnscontrol/v2/pkg/transform"
"github.com/StackExchange/dnscontrol/v2/providers"
"github.com/StackExchange/dnscontrol/v2/providers/diff"
"github.com/miekg/dns/dnsutil"
"github.com/pkg/errors"
)
@ -513,7 +513,7 @@ func (c *cfRecord) nativeToRecord(domain string) *models.RecordConfig {
}
rc.SetLabelFromFQDN(c.Name, domain)
// workaround for https://github.com/StackExchange/dnscontrol/issues/446
// workaround for https://github.com/StackExchange/dnscontrol/v2/issues/446
if c.Type == "SPF" {
c.Type = "TXT"
}

View File

@ -4,8 +4,8 @@ import (
"net"
"testing"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/pkg/transform"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/pkg/transform"
)
func newDomainConfig() *models.DomainConfig {

View File

@ -10,7 +10,7 @@ import (
"strings"
"time"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/pkg/errors"
)

View File

@ -3,9 +3,9 @@ package cloudns
import (
"encoding/json"
"fmt"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/providers"
"github.com/StackExchange/dnscontrol/providers/diff"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/providers"
"github.com/StackExchange/dnscontrol/v2/providers/diff"
"github.com/miekg/dns/dnsutil"
"github.com/pkg/errors"
"strconv"

View File

@ -6,8 +6,8 @@ import (
"github.com/gobwas/glob"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/pkg/printer"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/pkg/printer"
)
// Correlation stores a difference between two domains.

View File

@ -6,7 +6,7 @@ import (
"strings"
"testing"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/v2/models"
)
func myRecord(s string) *models.RecordConfig {
@ -263,7 +263,7 @@ func TestInvalidGlobIgnoredRecord(t *testing.T) {
checkLengthsFull(t, existing, desired, 0, 1, 0, 0, false, []string{"www1", "www2", "[.www3"})
}
// from https://github.com/StackExchange/dnscontrol/issues/552
// from https://github.com/StackExchange/dnscontrol/v2/issues/552
func TestCaas(t *testing.T) {
existing := []*models.RecordConfig{
myRecord("test CAA 1 1.1.1.1"),

View File

@ -6,9 +6,9 @@ import (
"fmt"
"net/http"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/providers"
"github.com/StackExchange/dnscontrol/providers/diff"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/providers"
"github.com/StackExchange/dnscontrol/v2/providers/diff"
"github.com/miekg/dns/dnsutil"
"github.com/pkg/errors"

View File

@ -8,9 +8,9 @@ import (
"strconv"
"strings"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/providers"
"github.com/StackExchange/dnscontrol/providers/diff"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/providers"
"github.com/StackExchange/dnscontrol/v2/providers/diff"
"github.com/pkg/errors"
"golang.org/x/oauth2"

View File

@ -8,9 +8,9 @@ import (
"github.com/exoscale/egoscale"
"github.com/pkg/errors"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/providers"
"github.com/StackExchange/dnscontrol/providers/diff"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/providers"
"github.com/StackExchange/dnscontrol/v2/providers/diff"
)
type exoscaleProvider struct {

View File

@ -5,10 +5,10 @@ import (
"fmt"
"sort"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/pkg/printer"
"github.com/StackExchange/dnscontrol/providers"
"github.com/StackExchange/dnscontrol/providers/diff"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/pkg/printer"
"github.com/StackExchange/dnscontrol/v2/providers"
"github.com/StackExchange/dnscontrol/v2/providers/diff"
"github.com/pkg/errors"
"strings"

View File

@ -7,10 +7,10 @@ import (
"strings"
"time"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/pkg/printer"
"github.com/StackExchange/dnscontrol/providers"
"github.com/StackExchange/dnscontrol/providers/diff"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/pkg/printer"
"github.com/StackExchange/dnscontrol/v2/providers"
"github.com/StackExchange/dnscontrol/v2/providers/diff"
"github.com/google/uuid"
"github.com/pkg/errors"
gandiclient "github.com/prasmussen/gandi-api/client"

View File

@ -3,7 +3,7 @@ package gandi
import (
"testing"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/prasmussen/gandi-api/live_dns/record"
"github.com/stretchr/testify/assert"
)

View File

@ -12,7 +12,7 @@ import (
gandiversion "github.com/prasmussen/gandi-api/domain/zone/version"
gandioperation "github.com/prasmussen/gandi-api/operation"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/v2/models"
)
// fetchDomainList gets list of domains for account. Cache ids for easy lookup.

View File

@ -3,8 +3,8 @@ package gandi5
// Convert the provider's native record description to models.RecordConfig.
import (
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/pkg/printer"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/pkg/printer"
"github.com/pkg/errors"
"github.com/tiramiseb/go-gandi/livedns"
)

View File

@ -3,7 +3,7 @@ package gandi5
import (
"testing"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/v2/models"
)
func TestRecordsToNative_1(t *testing.T) {

View File

@ -25,10 +25,10 @@ import (
"github.com/miekg/dns/dnsutil"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/pkg/printer"
"github.com/StackExchange/dnscontrol/providers"
"github.com/StackExchange/dnscontrol/providers/diff"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/pkg/printer"
"github.com/StackExchange/dnscontrol/v2/providers"
"github.com/StackExchange/dnscontrol/v2/providers/diff"
"github.com/pkg/errors"
)

View File

@ -9,9 +9,9 @@ import (
gauth "golang.org/x/oauth2/google"
gdns "google.golang.org/api/dns/v1"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/providers"
"github.com/StackExchange/dnscontrol/providers/diff"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/providers"
"github.com/StackExchange/dnscontrol/v2/providers/diff"
"github.com/pkg/errors"
)

View File

@ -5,7 +5,7 @@ import (
"encoding/json"
"fmt"
"github.com/StackExchange/dnscontrol/providers"
"github.com/StackExchange/dnscontrol/v2/providers"
hxcl "github.com/hexonet/go-sdk/client"
)

View File

@ -6,7 +6,7 @@ import (
"sort"
"strings"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/v2/models"
)
var defaultNameservers = []*models.Nameserver{

View File

@ -10,8 +10,8 @@ import (
"github.com/pkg/errors"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/providers/diff"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/providers/diff"
)
// HXRecord covers an individual DNS resource record.

View File

@ -2,8 +2,8 @@ package internetbs
import (
"fmt"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/providers"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/providers"
"github.com/pkg/errors"
"sort"
"strings"

View File

@ -6,9 +6,9 @@ import (
"fmt"
"net/http"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/providers"
"github.com/StackExchange/dnscontrol/providers/diff"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/providers"
"github.com/StackExchange/dnscontrol/v2/providers/diff"
"github.com/miekg/dns/dnsutil"
"github.com/pkg/errors"

View File

@ -9,10 +9,10 @@ import (
"golang.org/x/net/publicsuffix"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/pkg/printer"
"github.com/StackExchange/dnscontrol/providers"
"github.com/StackExchange/dnscontrol/providers/diff"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/pkg/printer"
"github.com/StackExchange/dnscontrol/v2/providers"
"github.com/StackExchange/dnscontrol/v2/providers/diff"
nc "github.com/billputer/go-namecheap"
"github.com/pkg/errors"
)

View File

@ -4,7 +4,7 @@ package namedotcom
import (
"encoding/json"
"github.com/StackExchange/dnscontrol/providers"
"github.com/StackExchange/dnscontrol/v2/providers"
"github.com/namedotcom/go/namecom"
"github.com/pkg/errors"
)

View File

@ -6,7 +6,7 @@ import (
"sort"
"strings"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/namedotcom/go/namecom"
)
@ -57,7 +57,7 @@ func (n *NameCom) GetRegistrarCorrections(dc *models.DomainConfig) ([]*models.Co
expected = append(expected, ns.Name)
// FIXME(tlim): This should store a FQDN with no trailing ".".
// See pkg/nameservers/nameservers.go for details.
// Bug https://github.com/StackExchange/dnscontrol/issues/491
// Bug https://github.com/StackExchange/dnscontrol/v2/issues/491
}
sort.Strings(expected)
expectedNameservers := strings.Join(expected, ",")

View File

@ -8,8 +8,8 @@ import (
"github.com/namedotcom/go/namecom"
"github.com/pkg/errors"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/providers/diff"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/providers/diff"
)
var defaultNameservers = []*models.Nameserver{

View File

@ -5,15 +5,15 @@ import (
"fmt"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/providers"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/providers"
"github.com/pkg/errors"
"net/http"
"strings"
"github.com/StackExchange/dnscontrol/providers/diff"
"github.com/StackExchange/dnscontrol/v2/providers/diff"
"gopkg.in/ns1/ns1-go.v2/rest"
"gopkg.in/ns1/ns1-go.v2/rest/model/dns"
)

View File

@ -27,10 +27,10 @@ import (
"path/filepath"
"strings"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/providers"
"github.com/StackExchange/dnscontrol/providers/diff"
"github.com/StackExchange/dnscontrol/providers/octodns/octoyaml"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/providers"
"github.com/StackExchange/dnscontrol/v2/providers/diff"
"github.com/StackExchange/dnscontrol/v2/providers/octodns/octoyaml"
"github.com/pkg/errors"
)

View File

@ -5,8 +5,8 @@ import (
"fmt"
"io/ioutil"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/pkg/transform"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/pkg/transform"
"github.com/robertkrimen/otto"
// load underscore js into vm by default

View File

@ -15,7 +15,7 @@ import (
"reflect"
"strconv"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/pkg/errors"
yaml "gopkg.in/yaml.v2"
)

View File

@ -7,8 +7,8 @@ import (
"net"
"sort"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/pkg/natsort"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/pkg/natsort"
"github.com/miekg/dns/dnsutil"
)

View File

@ -6,7 +6,7 @@ import (
"sort"
"strings"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/miekg/dns/dnsutil"
"github.com/pkg/errors"
yaml "gopkg.in/yaml.v2"

View File

@ -7,8 +7,8 @@ import (
"sort"
"strings"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/providers"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/providers"
opensrs "github.com/philhug/opensrs-go/opensrs"
)

View File

@ -6,9 +6,9 @@ import (
"sort"
"strings"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/providers"
"github.com/StackExchange/dnscontrol/providers/diff"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/providers"
"github.com/StackExchange/dnscontrol/v2/providers/diff"
"github.com/ovh/go-ovh/ovh"
"github.com/pkg/errors"
)

View File

@ -4,7 +4,7 @@ import (
"fmt"
"strings"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/miekg/dns/dnsutil"
"github.com/pkg/errors"
)

View File

@ -4,7 +4,7 @@ import (
"encoding/json"
"log"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/pkg/errors"
)

View File

@ -7,9 +7,9 @@ import (
"strings"
"time"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/providers"
"github.com/StackExchange/dnscontrol/providers/diff"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/providers"
"github.com/StackExchange/dnscontrol/v2/providers/diff"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/session"

View File

@ -6,9 +6,9 @@ import (
"regexp"
"strings"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/providers"
"github.com/StackExchange/dnscontrol/providers/diff"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/providers"
"github.com/StackExchange/dnscontrol/v2/providers/diff"
"github.com/pkg/errors"
"github.com/softlayer/softlayer-go/datatypes"

View File

@ -3,7 +3,7 @@ package vultr
import (
"testing"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/vultr/govultr"
)

View File

@ -7,9 +7,9 @@ import (
"strconv"
"strings"
"github.com/StackExchange/dnscontrol/models"
"github.com/StackExchange/dnscontrol/providers"
"github.com/StackExchange/dnscontrol/providers/diff"
"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/providers"
"github.com/StackExchange/dnscontrol/v2/providers/diff"
"github.com/miekg/dns/dnsutil"
"github.com/pkg/errors"
"github.com/vultr/govultr"