[PR #3522] [CLOSED] refactor(cmd): distribute commands into root.go, create.go, run.go, etc. #11186

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

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/3522
Author: @igophper
Created: 4/7/2024
Status: Closed

Base: mainHead: opt/refactor_cmd_file


📝 Commits (2)

  • 3946a31 refactor(cmd): distribute commands into root.go, create.go, run.go, etc.
  • 403090b Merge branch 'main' into opt/refactor_cmd_file

📊 Changes

12 files changed (+782 additions, -675 deletions)

View changed files

📝 cmd/cmd.go (+0 -674)
cmd/copy.go (+33 -0)
cmd/create.go (+196 -0)
cmd/delete.go (+35 -0)
cmd/list.go (+55 -0)
cmd/pull.go (+76 -0)
cmd/push.go (+76 -0)
cmd/root.go (+50 -0)
cmd/run.go (+107 -0)
cmd/serve.go (+50 -0)
cmd/show.go (+103 -0)
📝 llm/llama.cpp (+1 -1)

📄 Description

Previously, all commands were located in a single cmd.go file. This refactor improves the organization and readability of the code by distributing commands into their respective files such as root.go, create.go, run.go, etc.

Additionally, the modification this time was just copying and pasting the code into another file without making any changes to the code logic.


🔄 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/3522 **Author:** [@igophper](https://github.com/igophper) **Created:** 4/7/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `opt/refactor_cmd_file` --- ### 📝 Commits (2) - [`3946a31`](https://github.com/ollama/ollama/commit/3946a3155b81b6f269de84b4bd12c6cdb4ef7d83) refactor(cmd): distribute commands into root.go, create.go, run.go, etc. - [`403090b`](https://github.com/ollama/ollama/commit/403090b59671f2ba1b34d526e34ef4020279a0e4) Merge branch 'main' into opt/refactor_cmd_file ### 📊 Changes **12 files changed** (+782 additions, -675 deletions) <details> <summary>View changed files</summary> 📝 `cmd/cmd.go` (+0 -674) ➕ `cmd/copy.go` (+33 -0) ➕ `cmd/create.go` (+196 -0) ➕ `cmd/delete.go` (+35 -0) ➕ `cmd/list.go` (+55 -0) ➕ `cmd/pull.go` (+76 -0) ➕ `cmd/push.go` (+76 -0) ➕ `cmd/root.go` (+50 -0) ➕ `cmd/run.go` (+107 -0) ➕ `cmd/serve.go` (+50 -0) ➕ `cmd/show.go` (+103 -0) 📝 `llm/llama.cpp` (+1 -1) </details> ### 📄 Description Previously, all commands were located in a single cmd.go file. This refactor improves the organization and readability of the code by distributing commands into their respective files such as root.go, create.go, run.go, etc. Additionally, the modification this time was just copying and pasting the code into another file without making any changes to the code logic. --- <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:23:35 -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#11186