aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorGravatar Michael Richmond <mrichmon@users.noreply.github.com> 2016-04-28 11:07:44 -0700
committerGravatar Miek Gieben <miek@miek.nl> 2016-04-28 19:07:44 +0100
commite34280e7af517443a8f95e76247cf614c37fdbf6 (patch)
treef911eb03ff8e71d7f4c245e0694d3b47e2198734 /main.go
parentbba63f776518347f53697160fce638419c3fe813 (diff)
downloadcoredns-e34280e7af517443a8f95e76247cf614c37fdbf6.tar.gz
coredns-e34280e7af517443a8f95e76247cf614c37fdbf6.tar.zst
coredns-e34280e7af517443a8f95e76247cf614c37fdbf6.zip
Clean up remove caddy refs (#139)
* Changed reference to Caddy over to CoreDNS * Removing references to caddy * Fixed misleading error message to reference coredns * Cleaning up references to caddy * Adding clean and deps targets Muscle memory is resulting in "make clean" commands. * Adding test target to makefile * More "Caddy" cleanup
Diffstat (limited to 'main.go')
-rw-r--r--main.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/main.go b/main.go
index 9256e308b..a6afbf09e 100644
--- a/main.go
+++ b/main.go
@@ -84,13 +84,13 @@ func main() {
}
// Get Corefile input
- caddyfile, err := core.LoadCaddyfile(loadCaddyfile)
+ corefile, err := core.LoadCorefile(loadCorefile)
if err != nil {
mustLogFatal(err)
}
// Start your engines
- err = core.Start(caddyfile)
+ err = core.Start(corefile)
if err != nil {
mustLogFatal(err)
}
@@ -112,11 +112,11 @@ func mustLogFatal(args ...interface{}) {
log.Fatal(args...)
}
-func loadCaddyfile() (core.Input, error) {
+func loadCorefile() (core.Input, error) {
// Try -conf flag
if conf != "" {
if conf == "stdin" {
- return core.CaddyfileFromPipe(os.Stdin)
+ return core.CorefileFromPipe(os.Stdin)
}
contents, err := ioutil.ReadFile(conf)
@@ -124,7 +124,7 @@ func loadCaddyfile() (core.Input, error) {
return nil, err
}
- return core.CaddyfileInput{
+ return core.CorefileInput{
Contents: contents,
Filepath: conf,
RealFile: true,
@@ -134,13 +134,13 @@ func loadCaddyfile() (core.Input, error) {
// command line args
if flag.NArg() > 0 {
confBody := core.Host + ":" + core.Port + "\n" + strings.Join(flag.Args(), "\n")
- return core.CaddyfileInput{
+ return core.CorefileInput{
Contents: []byte(confBody),
Filepath: "args",
}, nil
}
- // Caddyfile in cwd
+ // Corefile in cwd
contents, err := ioutil.ReadFile(core.DefaultConfigFile)
if err != nil {
if os.IsNotExist(err) {
@@ -148,7 +148,7 @@ func loadCaddyfile() (core.Input, error) {
}
return nil, err
}
- return core.CaddyfileInput{
+ return core.CorefileInput{
Contents: contents,
Filepath: core.DefaultConfigFile,
RealFile: true,