I have the following types:
type Value interface{}
type NamedValue struct {
Name string
Value Value
}
type ErrorValue struct {
NamedValue
Error error
}
I can use use v := NamedValue{Name: "fine", Value: 33}, but I can not usee := ErrorValue{Name: "alpha", Value: 123, Error: err}
The injection syntax seems to be good, but using it doesn't work?
Ayman source
share