mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
Doc: Fixed a bit of havoc which appears in go docs (#2105)
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
This commit is contained in:
@ -31,10 +31,12 @@ func StripQuotes(s string) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ParseQuotedTxt returns the individual strings of a combined quoted string.
|
// ParseQuotedTxt returns the individual strings of a combined quoted string.
|
||||||
|
//
|
||||||
// `foo` -> []string{"foo"}
|
// `foo` -> []string{"foo"}
|
||||||
// `"foo"` -> []string{"foo"}
|
// `"foo"` -> []string{"foo"}
|
||||||
// `"foo" "bar"` -> []string{"foo", "bar"}
|
// `"foo" "bar"` -> []string{"foo", "bar"}
|
||||||
// `"f"oo" "bar"` -> []string{`f"oo`, "bar"}
|
// `"f"oo" "bar"` -> []string{`f"oo`, "bar"}
|
||||||
|
//
|
||||||
// NOTE: It is assumed there is exactly one space between the quotes.
|
// NOTE: It is assumed there is exactly one space between the quotes.
|
||||||
// NOTE: This doesn't handle escaped quotes.
|
// NOTE: This doesn't handle escaped quotes.
|
||||||
// NOTE: You probably want to use ParseQuotedFields() for RFC 1035-compliant quoting.
|
// NOTE: You probably want to use ParseQuotedFields() for RFC 1035-compliant quoting.
|
||||||
|
@ -52,25 +52,24 @@ import (
|
|||||||
//
|
//
|
||||||
// Name:
|
// Name:
|
||||||
//
|
//
|
||||||
// This is the shortname i.e. the NameFQDN without the origin suffix.
|
// This is the shortname i.e. the NameFQDN without the origin suffix. It should
|
||||||
// It should never have a trailing "."
|
// never have a trailing "." It should never be null. The apex (naked domain) is
|
||||||
// It should never be null. The apex (naked domain) is stored as "@".
|
// stored as "@". If the origin is "foo.com." and Name is "foo.com", this means
|
||||||
// If the origin is "foo.com." and Name is "foo.com", this means
|
|
||||||
// the intended FQDN is "foo.com.foo.com." (which may look odd)
|
// the intended FQDN is "foo.com.foo.com." (which may look odd)
|
||||||
//
|
//
|
||||||
// NameFQDN:
|
// NameFQDN:
|
||||||
//
|
//
|
||||||
// This is the FQDN version of Name.
|
// This is the FQDN version of Name. It should never have a trailing ".".
|
||||||
// It should never have a trailing ".".
|
//
|
||||||
// NOTE: Eventually we will unexport Name/NameFQDN. Please start using
|
// NOTE: Eventually we will unexport Name/NameFQDN. Please start using
|
||||||
// the setters (SetLabel/SetLabelFromFQDN) and getters (GetLabel/GetLabelFQDN).
|
// the setters (SetLabel/SetLabelFromFQDN) and getters (GetLabel/GetLabelFQDN).
|
||||||
// as they will always work.
|
// as they will always work.
|
||||||
//
|
//
|
||||||
// target:
|
// target:
|
||||||
//
|
//
|
||||||
// This is the host or IP address of the record, with
|
// This is the host or IP address of the record, with the other related
|
||||||
// the other related parameters (weight, priority, etc.) stored in individual
|
// parameters (weight, priority, etc.) stored in individual fields.
|
||||||
// fields.
|
//
|
||||||
// NOTE: Eventually we will unexport Target. Please start using the
|
// NOTE: Eventually we will unexport Target. Please start using the
|
||||||
// setters (SetTarget*) and getters (GetTarget*) as they will always work.
|
// setters (SetTarget*) and getters (GetTarget*) as they will always work.
|
||||||
//
|
//
|
||||||
|
@ -154,8 +154,9 @@ func (rc *RecordConfig) GetTargetTXTJoined() string {
|
|||||||
|
|
||||||
// SetTargetTXTString is like SetTargetTXTs but accepts one big string,
|
// SetTargetTXTString is like SetTargetTXTs but accepts one big string,
|
||||||
// which is parsed into individual strings.
|
// which is parsed into individual strings.
|
||||||
// Ex: foo << 1 string
|
// Ex:
|
||||||
//
|
//
|
||||||
|
// foo << 1 string
|
||||||
// foo bar << 1 string
|
// foo bar << 1 string
|
||||||
// "foo bar" << 1 string
|
// "foo bar" << 1 string
|
||||||
// "foo" "bar" << 2 strings
|
// "foo" "bar" << 2 strings
|
||||||
@ -182,8 +183,9 @@ func (rc *RecordConfig) SetTargetTXTString(s string) error {
|
|||||||
// SetTargetTXTfromRFC1035Quoted parses a series of quoted strings
|
// SetTargetTXTfromRFC1035Quoted parses a series of quoted strings
|
||||||
// and sets .TxtStrings based on the result.
|
// and sets .TxtStrings based on the result.
|
||||||
// Note: Most APIs do notThis is rarely used. Try using SetTargetTXT() first.
|
// Note: Most APIs do notThis is rarely used. Try using SetTargetTXT() first.
|
||||||
// Ex: "foo" << 1 string
|
// Ex:
|
||||||
//
|
//
|
||||||
|
// "foo" << 1 string
|
||||||
// "foo bar" << 1 string
|
// "foo bar" << 1 string
|
||||||
// "foo" "bar" << 2 strings
|
// "foo" "bar" << 2 strings
|
||||||
// foo << error. No quotes! Did you intend to use SetTargetTXT?
|
// foo << error. No quotes! Did you intend to use SetTargetTXT?
|
||||||
|
Reference in New Issue
Block a user