-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnamespace.go
More file actions
30 lines (24 loc) · 753 Bytes
/
namespace.go
File metadata and controls
30 lines (24 loc) · 753 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package hmc
import (
"encoding/xml"
"fmt"
)
// Namespace should be embedded in the top-level element to provide context about what the hyper control elements are.
//
// SetNamespace should be used to populate the values to their default.
type Namespace struct {
HcXmlns string `xml:"xmlns:c,attr" json:"-"`
Docs xml.Comment `xml:",comment" json:"-"`
}
var docs xml.Comment
const repo string = "github.com/Teajey/hmc"
func init() {
docs = xml.Comment(fmt.Sprintf("See an overview of what this XML means at https://%s/blob/main/README.md ", repo))
}
// SetNamespace provides a default setting for the Namespace struct.
func SetNamespace() Namespace {
return Namespace{
HcXmlns: "https://github.com/Teajey/hmc",
Docs: docs,
}
}