---
title: collections.Uniq
description: Returns the given collection, removing duplicate elements.
categories: []
keywords: []
params:
  functions_and_methods:
    aliases: [uniq]
    returnType: any
    signatures: [collections.Uniq COLLECTION]
aliases: [/functions/uniq]
---

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