### Describe the feature So far nobody (not even the documentation) has shown a way to marshal data types. ### Describe the solution you'd like Introduce marshaller interfaces like so: ```go type INIUnmarshaller interface { UnmarshalINI([]byte) error } type INIMarshaller interface { MarshalINI([]byte, error) } ``` ### Describe alternatives you've considered Alternative: Manually load data as string and then convert into custom type ### Additional context Usage: ```go type Permission int const ( None Permission = iota Read Permission Write Edit Group ) type Config struct { Foo string Permission Permission } var permToStringMap = map[string]Permission = { "none": None, "read": Read, "write": Write, "edit": Edit, "group": Group, } func (c *Permission) UnmarshalINI(p []byte) error { p, ok := permToStringMap[string(p)] if !ok { return fmt.Errorf("invalid permission `%v`", p) } *c = p return nil } ``` config.ini ````ini permission = "Group" ```` ### Code of Conduct - [X] I agree to follow this project's Code of Conduct