What does the new function do?

Report a typo

Suppose you have a Go program that has the Country struct declaration, and then initializes a struct germany using the new function:

package main

type Country struct {
    Name       string
    Capital    string
    Population int
}

func main() {
    germany := new(Country)
}

Select all the correct statements regarding the new function when it is used to initialize the germany struct.

Select one or more options from the list
___

Create a free account to access the full topic