diff options
author | Mike Crute <mike@crute.us> | 2020-02-13 23:14:18 +0000 |
---|---|---|
committer | Mike Crute <mike@crute.us> | 2020-08-11 02:56:10 +0000 |
commit | fa346cbe0ab89b3a3c02d8fae85dc5aa471b62a3 (patch) | |
tree | fbd2d45cdaab047ed93733399f9048716b479217 /bind/util.go | |
parent | 1010edcba255040f8e4140f45f9113969d79effb (diff) | |
download | go_ddns_manager-wip-more-management.tar.bz2 go_ddns_manager-wip-more-management.tar.xz go_ddns_manager-wip-more-management.zip |
WIP: Add more management controllerswip-more-management
Diffstat (limited to 'bind/util.go')
-rw-r--r-- | bind/util.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/bind/util.go b/bind/util.go new file mode 100644 index 0000000..cc0ef23 --- /dev/null +++ b/bind/util.go | |||
@@ -0,0 +1,17 @@ | |||
1 | package bind | ||
2 | |||
3 | import ( | ||
4 | "strings" | ||
5 | ) | ||
6 | |||
7 | func DeCanonicalize(z string) string { | ||
8 | return strings.TrimRight(z, ".") | ||
9 | } | ||
10 | |||
11 | func Canonicalize(z string) string { | ||
12 | if !strings.HasSuffix(z, ".") { | ||
13 | return z + "." | ||
14 | } else { | ||
15 | return z | ||
16 | } | ||
17 | } | ||