How to compare two structs, slices or maps in Go for equality?
Hello everyone! I just started learning Go and encountered a problem when comparing complex data types. I'm trying to compare two structs, two slices, and two maps, but I'm getting unexpected results.\n\nHere's an example code that doesn't work:\n\n```go\npackage main\n\nimport "fmt"\n\ntype Person struct {\n Name string\n Age int\n}\n\nfunc main() {\n // Comparing structs\n p1 := Person{Name: "Alice", Age: 30}\n p2 := Person{Name: "Alice", Age: 30}\n fmt.Println("Structs are equal?", p1 == p2) // Prints true, but this is not always the case\n\n // Comparing slices\n slice1 := []int{1, 2, 3}\n slice2 := []int{1, 2, 3}\n // fmt.Println(slice1 == slice2) // Compilation error: slice can only be compared to nil\n\n // Comparing maps\n map1 := map[string]int{"a": 1, "b": 2}