Task: Sort an Array of Structs by Field Name in Go
Task: Sort an Array of Structs by Field Name in Go: a task in Terminal-Lego-15k (Harbor dataset). You are given a Go program that defines a Planet struct and creates an array of planets (Mars, Venus, Earth). Your task is to modify the program to sort this array of structs by the Axis field in…
The task
You are given a Go program that defines a `Planet` struct and creates an array of planets (Mars, Venus, Earth). Your task is to modify the program to sort this array of structs by the `Axis` field in ascending order.
Part of PrimeIntellect/Terminal-Lego-15k.