mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-09-13 16:44:57 +08:00
DOCS: Clarify IPv6 variables are strings (#1775)
Co-authored-by: Jeffrey Cafferata <jeffrey@jcid.nl>
This commit is contained in:
parent
ab026c31cd
commit
490db87ce6
2 changed files with 21 additions and 2 deletions
|
@ -6,8 +6,6 @@ parameters:
|
|||
|
||||
Converts an IPv4 address from string to an integer. This allows performing mathematical operations with the IP address.
|
||||
|
||||
This does not accept IPv6 addresses. (PRs gladly accepted.)
|
||||
|
||||
{% capture example %}
|
||||
```js
|
||||
var addrA = IP('1.2.3.4')
|
||||
|
@ -17,3 +15,18 @@ var addrB = addrA + 1
|
|||
{% endcapture %}
|
||||
|
||||
{% include example.html content=example %}
|
||||
|
||||
NOTE: `IP()` does not accept IPv6 addresses (PRs gladly accepted!). IPv6 addresses are simply strings:
|
||||
|
||||
{% capture example2 %}
|
||||
```js
|
||||
// IPv4 Var
|
||||
var addrA1 = IP("1.2.3.4");
|
||||
var addrA2 = "1.2.3.4";
|
||||
|
||||
// IPv6 Var
|
||||
var addrAAAA = "0:0:0:0:0:0:0:0";
|
||||
```
|
||||
{% endcapture %}
|
||||
|
||||
{% include example.html content=example2 %}
|
||||
|
|
|
@ -53,6 +53,12 @@ D('example.com', REG, DnsProvider('R53'),
|
|||
)
|
||||
```
|
||||
|
||||
NOTE: The `IP()` function doesn't currently support IPv6 (PRs welcome!). IPv6 addresses are strings.
|
||||
|
||||
```js
|
||||
var addrAAAA = "0:0:0:0:0:0:0:0";
|
||||
```
|
||||
|
||||
## Variables to swap active Data Center
|
||||
|
||||
```js
|
||||
|
|
Loading…
Add table
Reference in a new issue