[PR #12280] [MERGED] refactor: use the built-in max/min to simplify the code #13766

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

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/12280
Author: @russcoss
Created: 9/14/2025
Status: Merged
Merged: 9/17/2025
Merged by: @jessegross

Base: mainHead: main


📝 Commits (1)

  • 93fef54 refactor: use the built-in max/min to simplify the code

📊 Changes

4 files changed (+4 additions, -20 deletions)

View changed files

📝 runner/llamarunner/cache.go (+1 -6)
📝 runner/ollamarunner/cache.go (+1 -6)
📝 server/internal/internal/backoff/backoff.go (+1 -4)
📝 server/sched.go (+1 -4)

📄 Description

In Go 1.21, the standard library includes built-in max/min function, which can greatly simplify the code.


🔄 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/12280 **Author:** [@russcoss](https://github.com/russcoss) **Created:** 9/14/2025 **Status:** ✅ Merged **Merged:** 9/17/2025 **Merged by:** [@jessegross](https://github.com/jessegross) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`93fef54`](https://github.com/ollama/ollama/commit/93fef5419dcdeecd85914217b2d6758d7a0ea4a0) refactor: use the built-in max/min to simplify the code ### 📊 Changes **4 files changed** (+4 additions, -20 deletions) <details> <summary>View changed files</summary> 📝 `runner/llamarunner/cache.go` (+1 -6) 📝 `runner/ollamarunner/cache.go` (+1 -6) 📝 `server/internal/internal/backoff/backoff.go` (+1 -4) 📝 `server/sched.go` (+1 -4) </details> ### 📄 Description In Go 1.21, the standard library includes built-in [max/min](https://pkg.go.dev/builtin@go1.21.0#max) function, which can greatly simplify the code. --- <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:50 -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#13766