chainguard-dev / yam

A sweet little formatter for YAML
Apache License 2.0
20 stars 10 forks source link

feat(encode): accept any input type #67

Closed luhring closed 3 months ago

luhring commented 3 months ago

Previously, only a *yaml.Node was accepted, which required the caller to encode arbitrary data to an AST node before they would be able to use the Encoder. This saves them that step while remaining backwards-compatible for callers still passing in AST nodes.