Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
C
Coredns
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Railgun
Coredns
Commits
4723fb94
Commit
4723fb94
authored
Feb 22, 2017
by
Miek Gieben
Committed by
GitHub
Feb 22, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Gofmt all code (#552)
* Gofmt all code * fmt
parent
682957cc
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
25 deletions
+26
-25
core/dnsserver/config.go
core/dnsserver/config.go
+1
-1
middleware/loadbalance/setup.go
middleware/loadbalance/setup.go
+1
-1
middleware/middleware.go
middleware/middleware.go
+1
-1
middleware/pprof/setup.go
middleware/pprof/setup.go
+2
-1
middleware/reverse/network_test.go
middleware/reverse/network_test.go
+21
-21
No files found.
core/dnsserver/config.go
View file @
4723fb94
...
...
@@ -22,7 +22,7 @@ type Config struct {
Root
string
// Server is the server that handles this config
Server
*
Server
Server
*
Server
// Middleware stack.
Middleware
[]
middleware
.
Middleware
...
...
middleware/loadbalance/setup.go
View file @
4723fb94
package
loadbalance
import
(
"github.com/mholt/caddy"
"github.com/coredns/coredns/core/dnsserver"
"github.com/coredns/coredns/middleware"
"github.com/mholt/caddy"
)
func
init
()
{
...
...
middleware/middleware.go
View file @
4723fb94
...
...
@@ -6,7 +6,7 @@ import (
"fmt"
"github.com/miekg/dns"
ot
"github.com/opentracing/opentracing-go"
ot
"github.com/opentracing/opentracing-go"
"golang.org/x/net/context"
)
...
...
middleware/pprof/setup.go
View file @
4723fb94
...
...
@@ -3,8 +3,9 @@ package pprof
import
(
"sync"
"github.com/mholt/caddy"
"github.com/coredns/coredns/middleware"
"github.com/mholt/caddy"
)
func
init
()
{
...
...
middleware/reverse/network_test.go
View file @
4723fb94
package
reverse
import
(
"testing"
"net"
"reflect"
"regexp"
"testing"
)
// Test converting from hostname to IP and back again to hostname
...
...
@@ -23,18 +23,18 @@ func TestNetworkConversion(t *testing.T) {
}{
{
network
{
IPnet
:
net4
,
Template
:
"dns-{ip}.domain.internal."
,
RegexMatchIP
:
regexIP4
,
IPnet
:
net4
,
Template
:
"dns-{ip}.domain.internal."
,
RegexMatchIP
:
regexIP4
,
},
"dns-10-1-1-23.domain.internal."
,
net
.
ParseIP
(
"10.1.1.23"
),
},
{
network
{
IPnet
:
net6
,
Template
:
"dns-{ip}.domain.internal."
,
RegexMatchIP
:
regexIP6
,
IPnet
:
net6
,
Template
:
"dns-{ip}.domain.internal."
,
RegexMatchIP
:
regexIP6
,
},
"dns-fd01000000000000000000000000a32f.domain.internal."
,
net
.
ParseIP
(
"fd01::a32f"
),
...
...
@@ -70,56 +70,56 @@ func TestNetworkHostnameToIP(t *testing.T) {
}{
{
network
{
IPnet
:
net4
,
RegexMatchIP
:
regexIP4
,
IPnet
:
net4
,
RegexMatchIP
:
regexIP4
,
},
// domain does not match
"dns-10-1-1-23.domain.internals."
,
},
{
network
{
IPnet
:
net4
,
RegexMatchIP
:
regexIP4
,
IPnet
:
net4
,
RegexMatchIP
:
regexIP4
,
},
// IP does match / contain in subnet
"dns-200-1-1-23.domain.internals."
,
},
{
network
{
IPnet
:
net4
,
RegexMatchIP
:
regexIP4
,
IPnet
:
net4
,
RegexMatchIP
:
regexIP4
,
},
// template does not match
"dns-10-1-1-23-x.domain.internal."
,
},
{
network
{
IPnet
:
net4
,
RegexMatchIP
:
regexIP4
,
IPnet
:
net4
,
RegexMatchIP
:
regexIP4
,
},
// template does not match
"IP-dns-10-1-1-23.domain.internal."
,
},
{
network
{
IPnet
:
net6
,
RegexMatchIP
:
regexIP6
,
IPnet
:
net6
,
RegexMatchIP
:
regexIP6
,
},
// template does not match
"dnx-fd01000000000000000000000000a32f.domain.internal."
,
},
{
network
{
IPnet
:
net6
,
RegexMatchIP
:
regexIP6
,
IPnet
:
net6
,
RegexMatchIP
:
regexIP6
,
},
// no valid v6 (missing one 0, only 31 chars)
"dns-fd0100000000000000000000000a32f.domain.internal."
,
},
{
network
{
IPnet
:
net6
,
RegexMatchIP
:
regexIP6
,
IPnet
:
net6
,
RegexMatchIP
:
regexIP6
,
},
// IP does match / contain in subnet
"dns-ed01000000000000000000000000a32f.domain.internal."
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment