[PR #165] [MERGED] Add error handeling and consolidate duplicate code #277

Closed
opened 2026-02-28 00:41:31 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Telmate/proxmox-api-go/pull/165
Author: @Tinyblargon
Created: 4/13/2022
Status: Merged
Merged: 4/14/2022
Merged by: @mleone87

Base: masterHead: master


📝 Commits (2)

  • ffbf21d Add error handeling and consolidate duplicate code
  • 49fe7e0 Add comments to functions

📊 Changes

4 files changed (+108 additions, -166 deletions)

View changed files

📝 main.go (+21 -5)
📝 proxmox/client.go (+73 -140)
📝 proxmox/config_acme_plugin.go (+4 -4)
📝 proxmox/config_user.go (+10 -17)

📄 Description

Added error handeling to the main.go file wherever it was missing.

Added more standardized functions in the client class to consolidated code.
Most API interactions are the same create, update and delete steps. Each of these interactions have a version where they have to wait on Proxmox to complete the request, and a version where the task completes immediately. These 6 functions should cut down on code duplication.


🔄 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/Telmate/proxmox-api-go/pull/165 **Author:** [@Tinyblargon](https://github.com/Tinyblargon) **Created:** 4/13/2022 **Status:** ✅ Merged **Merged:** 4/14/2022 **Merged by:** [@mleone87](https://github.com/mleone87) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (2) - [`ffbf21d`](https://github.com/Telmate/proxmox-api-go/commit/ffbf21d162587e3761f1866b1bf2a1bc23f3d7cf) Add error handeling and consolidate duplicate code - [`49fe7e0`](https://github.com/Telmate/proxmox-api-go/commit/49fe7e006837a67b33b917e7d1f2690d081e03f9) Add comments to functions ### 📊 Changes **4 files changed** (+108 additions, -166 deletions) <details> <summary>View changed files</summary> 📝 `main.go` (+21 -5) 📝 `proxmox/client.go` (+73 -140) 📝 `proxmox/config_acme_plugin.go` (+4 -4) 📝 `proxmox/config_user.go` (+10 -17) </details> ### 📄 Description Added error handeling to the main.go file wherever it was missing. Added more standardized functions in the client class to consolidated code. Most API interactions are the same create, update and delete steps. Each of these interactions have a version where they have to wait on Proxmox to complete the request, and a version where the task completes immediately. These 6 functions should cut down on code duplication. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 00:41:31 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/proxmox-api-go#277
No description provided.