[PR #11978] [CLOSED] refactor: use slices.Contains to simplify code #39548

Closed
opened 2026-04-23 00:26:33 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/11978
Author: @deepdring
Created: 8/20/2025
Status: Closed

Base: mainHead: main


📝 Commits (1)

  • 4e9dcbe refactor: use slices.Contains to simplify code

📊 Changes

1 file changed (+2 additions, -4 deletions)

View changed files

📝 cmd/cmd.go (+2 -4)

📄 Description

There is a new function added in the go1.21 standard library, which can make the code more concise and easy to read.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/11978 **Author:** [@deepdring](https://github.com/deepdring) **Created:** 8/20/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`4e9dcbe`](https://github.com/ollama/ollama/commit/4e9dcbe071f525bd68bf2bff6da7db7b7f8dc6ec) refactor: use slices.Contains to simplify code ### 📊 Changes **1 file changed** (+2 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `cmd/cmd.go` (+2 -4) </details> ### 📄 Description There is a [new function](https://pkg.go.dev/slices@go1.21.0#Contains) added in the go1.21 standard library, which can make the code more concise and easy to read. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-23 00:26:33 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#39548