You have been provided with an incomplete Go program designed to take a YAML string as input. The program's objective is to deserialize the YAML object into a variable of type Car.
The Car type contains additional struct types, Engine, which encapsulates details about the car's engine, including its type, power, and whether it has a turbocharger. The type Car is declared as follows:
type Engine struct {
Type string
Power int
Turbo bool
}
type Car struct {
Make string
Model string
Year int
Price float32
Engine Engine
}The provided YAML string for the input resembles the following example:
make: Tesla
model: model3
year: 2022
price_in_USD: 35999.99
engine_type: V6
max_horsepower: 450
turbo: trueYour task is to write the additional missing code in the program to:
Adding the correct YAML struct tags to each field of the
Carstruct.Implement the necessary code to unmarshal the YAML input string into a variable of type
Car.Display the variable holding the unmarshalled YAML input on the standard output.