Quiz: Inheritance and Equality
Test your understanding of inheritance and equality in Go.
1
What is the output of the following code?
package main
import "net/http"
type MyClient http.Client
func main() {
client := MyClient{}
_, err := client.Get("https://google.com")
if err != nil {
panic(err)
}
}
A)
It will execute successfully.
B)
It will not work.
C)
Stuck in an infinite loop.
D)
None of the above.
Question 1 of 70 attempted
Get hands-on with 1400+ tech skills courses.