(arr []string)
| 33 | } |
| 34 | |
| 35 | func unique(arr []string) *[]string { |
| 36 | occurred := map[string]bool{} |
| 37 | var result []string |
| 38 | |
| 39 | for e := range arr { |
| 40 | if !occurred[arr[e]] { |
| 41 | occurred[arr[e]] = true |
| 42 | result = append(result, arr[e]) |
| 43 | } |
| 44 | } |
| 45 | return &result |
| 46 | } |
no outgoing calls
no test coverage detected