[PR #12249] [MERGED] refactor: use slices.Contains to simplify code #13750

Closed
opened 2026-04-13 00:35:10 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/12249
Author: @fengyuchuanshen
Created: 9/11/2025
Status: Merged
Merged: 9/11/2025
Merged by: @jmorganca

Base: mainHead: main


📝 Commits (1)

  • b48c1d2 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/12249 **Author:** [@fengyuchuanshen](https://github.com/fengyuchuanshen) **Created:** 9/11/2025 **Status:** ✅ Merged **Merged:** 9/11/2025 **Merged by:** [@jmorganca](https://github.com/jmorganca) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`b48c1d2`](https://github.com/ollama/ollama/commit/b48c1d2a717bbfabecf87ecd8b525987f10c3785) 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-13 00:35:10 -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#13750