[PR #15936] refactor: use slices.Backward to simplify the code #77660

Open
opened 2026-05-05 10:20:12 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/15936
Author: @criciss
Created: 5/2/2026
Status: 🔄 Open

Base: mainHead: main


📝 Commits (1)

  • c17ec53 refactor: use slices.Backward to simplify the code

📊 Changes

9 files changed (+27 additions, -21 deletions)

View changed files

📝 cmd/tui/selector.go (+3 -2)
📝 llm/server.go (+3 -3)
📝 model/renderers/deepseek3.go (+3 -2)
📝 model/renderers/qwen35.go (+3 -2)
📝 model/renderers/qwen3vl.go (+3 -2)
📝 openai/openai.go (+2 -2)
📝 thinking/template.go (+5 -4)
📝 x/mlxrunner/cache.go (+2 -2)
📝 x/models/gemma4/gemma4.go (+3 -2)

📄 Description

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

More info can see https://github.com/golang/go/issues/61899


🔄 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/15936 **Author:** [@criciss](https://github.com/criciss) **Created:** 5/2/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`c17ec53`](https://github.com/ollama/ollama/commit/c17ec53697e3191c59ffe077a3ac82bf45abd822) refactor: use slices.Backward to simplify the code ### 📊 Changes **9 files changed** (+27 additions, -21 deletions) <details> <summary>View changed files</summary> 📝 `cmd/tui/selector.go` (+3 -2) 📝 `llm/server.go` (+3 -3) 📝 `model/renderers/deepseek3.go` (+3 -2) 📝 `model/renderers/qwen35.go` (+3 -2) 📝 `model/renderers/qwen3vl.go` (+3 -2) 📝 `openai/openai.go` (+2 -2) 📝 `thinking/template.go` (+5 -4) 📝 `x/mlxrunner/cache.go` (+2 -2) 📝 `x/models/gemma4/gemma4.go` (+3 -2) </details> ### 📄 Description There is a [new function](https://pkg.go.dev/slices@go1.23.0#Backward) added in the go1.23 standard library, which can make the code more concise and easy to read. More info can see https://github.com/golang/go/issues/61899 --- <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-05-05 10:20:12 -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#77660