Initial import
Some checks failed
Run tests / test (1.25) (push) Has been cancelled
Run tests / test (stable) (push) Has been cancelled

This commit is contained in:
2026-02-22 20:27:07 +01:00
commit fb898bb058
77 changed files with 2719 additions and 0 deletions

20
util.go Normal file
View File

@@ -0,0 +1,20 @@
package hamview
import (
"fmt"
"github.com/sirupsen/logrus"
"go.yaml.in/yaml/v3"
)
// Logger used by this package.
var Logger *logrus.Logger = logrus.New()
func unmarshalOne(node yaml.Node, value any) error {
Logger.Printf("node: %#+v", node)
Logger.Printf("content: %d", len(node.Content))
if len(node.Content) != 1 {
return fmt.Errorf("hamview: expected 1 configuration value, got %d", len(node.Content))
}
return node.Content[0].Decode(value)
}