---
title: "use-slices-sort"
description: "Prefer slices.Sort over sort.Slice."
image: "https://strider.gempir.com/og.png"
---

> Documentation Index
> Fetch the complete documentation index at: https://strider.gempir.com/llms.txt
> Use this file to discover all available pages before exploring further.

# use-slices-sort

<!-- Code generated by docs/scripts/generate-check-docs.go; DO NOT EDIT. -->

**Default severity:** `warning`

Prefer slices.Sort over sort.Slice.

## Bad

```go
sort.Slice(values, func(i, j int) bool { return values[i] < values[j] })
```

## Good

```go
slices.Sort(values)
```

Source: https://strider.gempir.com/lints/use-slices-sort/index.mdx
