-
Notifications
You must be signed in to change notification settings - Fork 382
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Version
1.67.0
Describe the bug
Parser doesn't recognize pointer slices, fails with unsupported type: []ptr
To reproduce
package main
import (
"log"
"gopkg.in/ini.v1"
)
const iniData = `user=foo
user=bar
user=baz
`
type Config struct {
Users []*string `ini:"user,allowshadow"`
}
func main() {
cfgFile, err := ini.LoadSources(ini.LoadOptions{AllowShadows: true}, []byte(iniData))
if err != nil {
log.Fatal(err)
}
cfg := new(Config)
if err := cfgFile.MapTo(&cfg); err != nil {
log.Fatal(err)
}
}
Expected behavior
Correctly unmarshal into []*string
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working