Experimental changes, switched to toml instead of yaml. Hopefully everyone will like this as much as I do.

This commit is contained in:
Storm Dragon
2025-12-10 20:52:37 -05:00
parent bb80b13c36
commit dd425563ba
6 changed files with 31 additions and 18 deletions

15
uiterm/key_toml.go Normal file
View File

@@ -0,0 +1,15 @@
package uiterm
// MarshalText implements the encoding.TextMarshaler interface for Key
// This allows TOML to serialize Key values as strings
func (i Key) MarshalText() ([]byte, error) {
return []byte(i.String()), nil
}
// UnmarshalText implements the encoding.TextUnmarshaler interface for Key
// This allows TOML to deserialize strings back into Key values
func (i *Key) UnmarshalText(data []byte) error {
var err error
*i, err = KeyString(string(data))
return err
}