-
+
|
@@ -198,8 +198,8 @@
|
-
-
+ |
+
|
|
diff --git a/providers/capabilities.go b/providers/capabilities.go
index 5aaafa7b6..36f09ef34 100644
--- a/providers/capabilities.go
+++ b/providers/capabilities.go
@@ -2,7 +2,6 @@ package providers
import (
"log"
- "strings"
)
//Capability is a bitmasked set of "features" that a provider supports. Only use constants from this package.
@@ -45,6 +44,7 @@ func ProviderHasCabability(pType string, cap Capability) bool {
type DocumentationNote struct {
HasFeature bool
Comment string
+ Link string
}
// DocumentationNotes is a full list of notes for a single provider
@@ -79,19 +79,30 @@ func unwrapProviderCapabilities(pName string, meta []ProviderMetadata) {
}
// Can is a small helper for concisely creating Documentation Notes
-// comments are variadic for easy ommission, so you generally should pass 0 or 1 only.
+// comments are variadic for easy ommission. First is comment, second is link, the rest are ignored.
func Can(comments ...string) *DocumentationNote {
- return &DocumentationNote{
+ n := &DocumentationNote{
HasFeature: true,
- Comment: strings.Join(comments, " "),
}
+ n.addStrings(comments)
+ return n
}
// Cannot is a small helper for concisely creating Documentation Notes
-// comments are variadic for easy ommission, so you generally should pass 0 or 1 only.
+// comments are variadic for easy ommission. First is comment, second is link, the rest are ignored.
func Cannot(comments ...string) *DocumentationNote {
- return &DocumentationNote{
+ n := &DocumentationNote{
HasFeature: false,
- Comment: strings.Join(comments, " "),
+ }
+ n.addStrings(comments)
+ return n
+}
+
+func (n *DocumentationNote) addStrings(comments []string) {
+ if len(comments) > 0 {
+ n.Comment = comments[0]
+ }
+ if len(comments) > 1 {
+ n.Link = comments[1]
}
}
diff --git a/providers/namedotcom/namedotcomProvider.go b/providers/namedotcom/namedotcomProvider.go
index 7447b658c..88facc8b7 100644
--- a/providers/namedotcom/namedotcomProvider.go
+++ b/providers/namedotcom/namedotcomProvider.go
@@ -23,7 +23,7 @@ var docNotes = providers.DocumentationNotes{
providers.DocDualHost: providers.Cannot("Apex NS records not editable"),
providers.DocCreateDomains: providers.Cannot("New domains require registration"),
providers.DocOfficiallySupported: providers.Can(),
- providers.CanUsePTR: providers.Cannot("PTR records are not supported https://www.name.com/support/articles/205188508-Reverse-DNS-records (2017-05-08)"),
+ providers.CanUsePTR: providers.Cannot("PTR records are not supported (See Link)", "https://www.name.com/support/articles/205188508-Reverse-DNS-records"),
}
func newReg(conf map[string]string) (providers.Registrar, error) {
|