If a type implements flag.Value interface, the Set method should
be called instead of failing with:
2016/12/04 10:38:07 multiconfig: field 'Private' has unsupported type: ptr
Partial, because for the following type:
var _ flag.Value = (*URL)(nil)
The following works:
type Endpoint struct {
Public *URL
}
m.MustLoad(&e)
And the following does not, even though the &e is addressable:
type Endpoint struct {
Public URL
}
m.MustLoad(&e)
This is not directly the problem of multiconfig package,
but with structs one, that multiconfig uses. The structs
package does not handle pointers, maps and slices that
one would expect for this use-case.
If a type implements flag.Value interface, the Set method should be called instead of failing with:
Partial, because for the following type:
The following works:
And the following does not, even though the &e is addressable:
This is not directly the problem of multiconfig package, but with structs one, that multiconfig uses. The structs package does not handle pointers, maps and slices that one would expect for this use-case.