mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2025-08-06 17:46:57 +02:00
Avoid shadowing package name (#410)
* chore: avoid shadowing package name * fix: use constant format in call to Sprintf * chore: try to make go1.9 work on travis
This commit is contained in:
parent
06e70ca8d0
commit
0f85859af0
@ -7,6 +7,7 @@ language: go
|
||||
|
||||
go:
|
||||
- 1.8
|
||||
- 1.9
|
||||
- tip
|
||||
|
||||
matrix:
|
||||
@ -15,7 +16,7 @@ matrix:
|
||||
|
||||
before_install:
|
||||
- go get github.com/mattn/goveralls
|
||||
- go get -u github.com/alecthomas/gometalinter
|
||||
- go get github.com/alecthomas/gometalinter
|
||||
|
||||
install:
|
||||
- gometalinter --install
|
||||
|
@ -28,9 +28,12 @@ import (
|
||||
"github.com/kubernetes-incubator/external-dns/provider"
|
||||
)
|
||||
|
||||
const (
|
||||
txtLabelFormat = "\"heritage=external-dns,external-dns/owner=%s\""
|
||||
)
|
||||
|
||||
var (
|
||||
txtLabelRegex = regexp.MustCompile("^\"heritage=external-dns,external-dns/owner=(.+)\"")
|
||||
txtLabelFormat = "\"heritage=external-dns,external-dns/owner=%s\""
|
||||
)
|
||||
|
||||
// TXTRegistry implements registry interface with ownership implemented via associated TXT records
|
||||
|
@ -66,13 +66,13 @@ func (sc *fakeSource) Endpoints() ([]*endpoint.Endpoint, error) {
|
||||
}
|
||||
|
||||
func (sc *fakeSource) generateEndpoint() (*endpoint.Endpoint, error) {
|
||||
endpoint := endpoint.NewEndpoint(
|
||||
ep := endpoint.NewEndpoint(
|
||||
generateDNSName(4, sc.dnsName),
|
||||
generateIPAddress(),
|
||||
endpoint.RecordTypeA,
|
||||
)
|
||||
|
||||
return endpoint, nil
|
||||
return ep, nil
|
||||
}
|
||||
|
||||
func generateIPAddress() string {
|
||||
|
Loading…
Reference in New Issue
Block a user