'Inbuilt method for element wise comparison of 2 struct arrays in Go?

I have a struct with the below structure,

//Number A struct that represents a new number to be addeded
type Number struct {
    Country   string `json:"country"`
    Number    string `json:"number"`
    CreatedAt string `json:"created_at"`
}

and I a getting a response array of this struct from the REST call and I need to do an element-wise comparison. Is there any inbuilt method to do the same or more efficient way to do it instead of using a for loop and iterating through the elements?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source