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

Vet and Lint the entire system (#296)

* govet and golint corrections
This commit is contained in:
Tom Limoncelli
2018-01-09 12:53:16 -05:00
committed by GitHub
parent 1a91a7f536
commit b7c251190f
64 changed files with 540 additions and 433 deletions

View File

@@ -22,13 +22,13 @@ Modifier arguments are processed according to type as follows:
var REGISTRAR = NewRegistrar("name.com", "NAMEDOTCOM");
var r53 = NewDnsProvider("R53","ROUTE53");
//simple domain
// simple domain
D("example.com", REGISTRAR, DnsProvider(r53),
A("@","1.2.3.4"),
CNAME("test", "foo.example2.com.")
);
//"macro" for records that can be mixed into any zone
// "macro" for records that can be mixed into any zone
var GOOGLE_APPS_DOMAIN_MX = [
MX('@', 1, 'aspmx.l.google.com.'),
MX('@', 5, 'alt1.aspmx.l.google.com.'),
@@ -44,4 +44,4 @@ D("example.com", REGISTRAR, DnsProvider(r53),
);
{%endhighlight%}
{% include endExample.html %}
{% include endExample.html %}

View File

@@ -10,14 +10,14 @@ arguments passed as if they were the first modifiers in the argument list.
{% include startExample.html %}
{% highlight js %}
var COMMON = NewDnsProvider("foo","BIND");
//we want to create backup zone files for all domains, but not actually register them.
//also create a default TTL
// we want to create backup zone files for all domains, but not actually register them.
// also create a default TTL
DEFAULTS( DnsProvider(COMMON,0), DefaultTTL(1000));
D("example.com", REGISTRAR, DnsProvider("R53"), A("@","1.2.3.4")); //this domain will have the defaults set.
D("example.com", REGISTRAR, DnsProvider("R53"), A("@","1.2.3.4")); // this domain will have the defaults set.
//clear defaults
// clear defaults
DEFAULTS();
D("example2.com", REGISTRAR, DnsProvider("R53"), A("@","1.2.3.4")); //this domain will not have the previous defaults.
D("example2.com", REGISTRAR, DnsProvider("R53"), A("@","1.2.3.4")); // this domain will not have the previous defaults.
{%endhighlight%}
{% include endExample.html %}
{% include endExample.html %}