✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Дан фрагмент кода на языке Go. Как инициализировать поле value значением 5?
type A struct{
value
int}
type B
struct{
A
}
func NewB(val int) B{
// Инициализация здесь
}
func main(){
var obj = NewB(
5)
fmt.Print(obj.value)
}