Most of the core functions are now in place

The hardest part has come and gone! it's all downhill now.
This commit is contained in:
Dave Shanley
2022-08-06 09:32:48 -04:00
parent 13781cbbde
commit 016595c905
9 changed files with 236 additions and 162 deletions

View File

@@ -17,7 +17,18 @@ type Encoding struct {
AllowReserved low.NodeReference[bool]
}
func (en Encoding) Build(root *yaml.Node) error {
func (en *Encoding) FindHeader(hType string) *low.ValueReference[*Header] {
for _, c := range en.Headers {
for n, o := range c {
if n.Value == hType {
return &o
}
}
}
return nil
}
func (en *Encoding) Build(root *yaml.Node) error {
headers, err := ExtractMap[*Header](HeadersLabel, root)
if err != nil {