mirror of
https://github.com/coredns/coredns.git
synced 2025-11-01 02:33:14 -04:00
plugin/metadata: finish documentation (#1951)
* plugin/metadata: finish documentation Finish the README.md, add corner case in the IsLabel test and reword some code comments slightly. Generate the man-pages and add man/coredns-metadata.7 as well. Signed-off-by: Miek Gieben <miek@miek.nl> * Fix test Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
@@ -49,7 +49,7 @@ type Provider interface {
|
||||
// Func is the type of function in the metadata, when called they return the value of the label.
|
||||
type Func func() string
|
||||
|
||||
// IsLabel check that the provided name looks like a valid label name
|
||||
// IsLabel checks that the provided name is a valid label name, i.e. two words separated by a slash.
|
||||
func IsLabel(label string) bool {
|
||||
p := strings.Index(label, "/")
|
||||
if p <= 0 || p >= len(label)-1 {
|
||||
|
||||
Reference in New Issue
Block a user