[PR #3161] [MERGED] llm,readline: use errors.Is instead of simple == check #11086

Closed
opened 2026-04-12 23:20:43 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/3161
Author: @bmizerany
Created: 3/15/2024
Status: Merged
Merged: 3/15/2024
Merged by: @bmizerany

Base: mainHead: errorsis


📝 Commits (2)

  • 170313d llm,readline: use errors.Is instead of simple == check
  • 988593c Update llm/gguf.go

📊 Changes

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

View changed files

📝 llm/gguf.go (+2 -1)
📝 llm/payload_common.go (+1 -1)
📝 readline/history.go (+1 -1)

📄 Description

This fixes some brittle, simple equality checks to use errors.Is. Since go1.13, errors.Is is the idiomatic way to check for errors.


🔄 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/3161 **Author:** [@bmizerany](https://github.com/bmizerany) **Created:** 3/15/2024 **Status:** ✅ Merged **Merged:** 3/15/2024 **Merged by:** [@bmizerany](https://github.com/bmizerany) **Base:** `main` ← **Head:** `errorsis` --- ### 📝 Commits (2) - [`170313d`](https://github.com/ollama/ollama/commit/170313d3858d8c5327818ad702d2778a5c4c278b) llm,readline: use errors.Is instead of simple == check - [`988593c`](https://github.com/ollama/ollama/commit/988593c9cf35f7a4acd783cfd3faa7d17a57a18c) Update llm/gguf.go ### 📊 Changes **3 files changed** (+4 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `llm/gguf.go` (+2 -1) 📝 `llm/payload_common.go` (+1 -1) 📝 `readline/history.go` (+1 -1) </details> ### 📄 Description This fixes some brittle, simple equality checks to use errors.Is. Since go1.13, errors.Is is the idiomatic way to check for errors. --- <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-12 23:20:43 -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#11086