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 (#2101)
This commit is contained in:
@ -55,7 +55,7 @@ import (
|
|||||||
// 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 never have a trailing "."
|
// It should never have a trailing "."
|
||||||
// It should never be null. The apex (naked domain) is stored as "@".
|
// It should never be null. The apex (naked domain) is stored as "@".
|
||||||
// If the origin is "foo.com." and Name is "foo.com", this literally 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:
|
||||||
@ -224,14 +224,11 @@ func (rc *RecordConfig) Copy() (*RecordConfig, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// SetLabel sets the .Name/.NameFQDN fields given a short name and origin.
|
// SetLabel sets the .Name/.NameFQDN fields given a short name and origin.
|
||||||
// origin must not have a trailing dot: The entire code base
|
// origin must not have a trailing dot: The entire code base maintains dc.Name
|
||||||
|
// without the trailig dot. Finding a dot here means something is very wrong.
|
||||||
//
|
//
|
||||||
// maintains dc.Name without the trailig dot. Finding a dot here means
|
// short must not have a training dot: That would mean you have a FQDN, and
|
||||||
// something is very wrong.
|
// shouldn't be using SetLabel(). Maybe SetLabelFromFQDN()?
|
||||||
//
|
|
||||||
// short must not have a training dot: That would mean you have
|
|
||||||
//
|
|
||||||
// a FQDN, and shouldn't be using SetLabel(). Maybe SetLabelFromFQDN()?
|
|
||||||
func (rc *RecordConfig) SetLabel(short, origin string) {
|
func (rc *RecordConfig) SetLabel(short, origin string) {
|
||||||
|
|
||||||
// Assertions that make sure the function is being used correctly:
|
// Assertions that make sure the function is being used correctly:
|
||||||
@ -289,12 +286,9 @@ func (rc *RecordConfig) SetLabelFromFQDN(fqdn, origin string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GetLabel returns the shortname of the label associated with this RecordConfig.
|
// GetLabel returns the shortname of the label associated with this RecordConfig.
|
||||||
// It will never end with "."
|
// It will never end with ".". It does not need further shortening (i.e. if it
|
||||||
// It does not need further shortening (i.e. if it returns "foo.com" and the
|
// returns "foo.com" and the domain is "foo.com" then the FQDN is actually
|
||||||
//
|
// "foo.com.foo.com"). It will never be "" (the apex is returned as "@").
|
||||||
// domain is "foo.com" then the FQDN is actually "foo.com.foo.com").
|
|
||||||
//
|
|
||||||
// It will never be "" (the apex is returned as "@").
|
|
||||||
func (rc *RecordConfig) GetLabel() string {
|
func (rc *RecordConfig) GetLabel() string {
|
||||||
return rc.Name
|
return rc.Name
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user