---
title: collections.Uniq
description: Returns a slice by removing duplicate elements from the given slice.
categories: []
keywords: []
params:
  functions_and_methods:
    aliases: [uniq]
    returnType: '[]any'
    signatures: [collections.Uniq SLICE]
aliases: [/functions/uniq]
---

```go-html-template
{{ slice 1 3 2 1 | uniq }} → [1 3 2]
```
