How do I use new versus make in Go?

In Go, `new` and `make` are two built-in functions that are used for memory allocation. However, they are used in different contexts and for different types of data structures.
new, make, Go, memory allocation, data structures, Go programming
        // Using new to allocate memory for a struct
        type Person struct {
            Name string
            Age  int
        }

        func main() {
            p := new(Person) // p is a pointer to a Person struct
            p.Name = "Alice"
            p.Age = 30
            fmt.Println(p)
        }

        // Using make to create a slice
        func main() {
            s := make([]int, 5) // s is a slice of integers
            fmt.Println(s)
        }
        

new make Go memory allocation data structures Go programming