[PR #9270] [MERGED] server: group routes by category and purpose #12905

Closed
opened 2026-04-13 00:12:28 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/9270
Author: @bmizerany
Created: 2/21/2025
Status: Merged
Merged: 2/22/2025
Merged by: @bmizerany

Base: mainHead: bmizerany/regrouproutes


📝 Commits (3)

  • 2aa076b server: group routes by category and purpose
  • 4015179 Update routes.go
  • 3cfeaad cleanup GET/HEAD loop and just say GET or HEAD.

📊 Changes

3 files changed (+50 additions, -32 deletions)

View changed files

📝 envconfig/config.go (+3 -3)
📝 envconfig/config_test.go (+1 -1)
📝 server/routes.go (+46 -28)

📄 Description

The route assembly in Handler lacked clear organization making it difficult scan for routes and their relationships to each other. This commit aims to fix that by reordering the assembly of routes to group them by category and purpose.

Also, be more specific about what "config" refers to (it is about CORS if you were wondering... I was.)


🔄 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/9270 **Author:** [@bmizerany](https://github.com/bmizerany) **Created:** 2/21/2025 **Status:** ✅ Merged **Merged:** 2/22/2025 **Merged by:** [@bmizerany](https://github.com/bmizerany) **Base:** `main` ← **Head:** `bmizerany/regrouproutes` --- ### 📝 Commits (3) - [`2aa076b`](https://github.com/ollama/ollama/commit/2aa076bc62743078a426c4fd25071ea3b188ebba) server: group routes by category and purpose - [`4015179`](https://github.com/ollama/ollama/commit/4015179c9695dee9b7f38cc47bf2289b0800d90a) Update routes.go - [`3cfeaad`](https://github.com/ollama/ollama/commit/3cfeaad79502155e09769482a98f1f12b07a6057) cleanup GET/HEAD loop and just say GET or HEAD. ### 📊 Changes **3 files changed** (+50 additions, -32 deletions) <details> <summary>View changed files</summary> 📝 `envconfig/config.go` (+3 -3) 📝 `envconfig/config_test.go` (+1 -1) 📝 `server/routes.go` (+46 -28) </details> ### 📄 Description The route assembly in Handler lacked clear organization making it difficult scan for routes and their relationships to each other. This commit aims to fix that by reordering the assembly of routes to group them by category and purpose. Also, be more specific about what "config" refers to (it is about CORS if you were wondering... I was.) --- <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:12:28 -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#12905