Number of Good Pairs Solutions in GoNumber 1512Difficulty EasyAcceptance 88.4%Link LeetCodeOther languages —SolutionsGo solution by halfrost/LeetCode-Gopackage leetcode func numIdenticalPairs(nums []int) int { total := 0 for x := 0; x < len(nums); x++ { for y := x + 1; y < len(nums); y++ { if nums[x] == nums[y] { total++ } } } return total}package leetcode func numIdenticalPairs(nums []int) int { total := 0 for x := 0; x < len(nums); x++ { for y := x + 1; y < len(nums); y++ { if nums[x] == nums[y] { total++ } } } return total }