Implementing a nested struct

Report a typo

Below you will see an implementation of the Team and FootballPlayer structs. Please write the additional code required to add Team as a nested struct of the FootballPlayer struct.

Take notice that to solve this task, you don't need to write or modify any code within the main function.

Sample Input 1:

Pedri 19 Midfielder
Barcelona Xavi

Sample Output 1:

{Pedri 19 Midfielder {Barcelona Xavi}}
Write a program in Go
package main

import "fmt"

type FootballPlayer struct {
Name string
Age int
Position string
? ? // What additional field should the FootballPlayer struct have?
}

type Team struct {
teamName string
coachName string
}

// DO NOT delete or modify the code within the main function!
func main() {
var player FootballPlayer
fmt.Scanln(&player.Name, &player.Age, &player.Position)
fmt.Scanln(&player.Team.teamName, &player.Team.coachName)

fmt.Println(player)
}
___

Create a free account to access the full topic