Go solution using sort
\nfunc frequencySort(nums []int) []int {\n    freq := make(map[int]int)\n    for _,v := range nums { freq[v] ++ }\n    sort.Slice(nums, func (a,b int) bool {\n 
```\nfunc frequencySort(nums []int) []int {\n    freq := make(map[int]int)\n    for _,v := range nums { freq[v] ++ }\n    sort.Slice(nums, func (a,b int) bool {\n        if freq[nums[a]] == freq[nums[b]] { return nums[a] > nums[b] }\n        return freq[nums[a]] < freq[nums[b]]\n    })\n    return nums\n}\n```
['Go']