reflect: add stubs for Value.MapRange

This object was added in Go 1.12 and is required by the fmt package.
Этот коммит содержится в:
Ayke van Laethem 2019-02-28 14:11:59 +01:00 коммит произвёл Ron Evans
родитель ad7297a539
коммит 06aa88abfb

Просмотреть файл

@ -365,6 +365,25 @@ func (v Value) MapIndex(key Value) Value {
panic("unimplemented: (reflect.Value).MapIndex()") panic("unimplemented: (reflect.Value).MapIndex()")
} }
func (v Value) MapRange() *MapIter {
panic("unimplemented: (reflect.Value).MapRange()")
}
type MapIter struct {
}
func (it *MapIter) Key() Value {
panic("unimplemented: (*reflect.MapIter).Key()")
}
func (it *MapIter) Value() Value {
panic("unimplemented: (*reflect.MapIter).Value()")
}
func (it *MapIter) Next() bool {
panic("unimplemented: (*reflect.MapIter).Next()")
}
func (v Value) Set(x Value) { func (v Value) Set(x Value) {
if !v.indirect { if !v.indirect {
panic("reflect: value is not addressable") panic("reflect: value is not addressable")