[PR #374] [MERGED] Optimize #428

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

📋 Pull Request Information

Original PR: https://github.com/Telmate/proxmox-api-go/pull/374
Author: @Tinyblargon
Created: 11/9/2024
Status: Merged
Merged: 11/9/2024
Merged by: @Tinyblargon

Base: masterHead: optimize1


📝 Commits (10+)

  • dc329c7 docs: add section about enum variables
  • 21258e6 refactor: rename enum to contain enum
  • 9099d6b refactor: optimize QemuUSB.Validate()
  • 8c82a8c refactor: simplify QemuUSB.mapToAPI()
  • c835a57 refactor: rename error veriable
  • e80cddd refactor: add QemuUsbID.String()
  • 4f7c117 refactor: remove dead code
  • 2341775 feat: added error constants
  • 33d6d94 refactor: remove dead code
  • 26d81e8 refactor: should be value not pointer

📊 Changes

8 files changed (+116 additions, -241 deletions)

View changed files

📝 docs/style-guide/sdk.md (+18 -2)
📝 proxmox/config_group.go (+17 -27)
📝 proxmox/config_group_test.go (+24 -42)
📝 proxmox/config_qemu.go (+0 -43)
📝 proxmox/config_qemu_test.go (+1 -1)
📝 proxmox/config_qemu_usb.go (+54 -124)
📝 proxmox/config_user.go (+1 -1)
📝 proxmox/session.go (+1 -1)

📄 Description

  • Added to the style guide.
  • Optimized the internals of QemuUSB.
  • Removed dead code.
  • Reworked GroupName.Validate() to have it's errors as constants.
  • Changed pointer to value, as the pointer only added the need for more validation.

🔄 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/374 **Author:** [@Tinyblargon](https://github.com/Tinyblargon) **Created:** 11/9/2024 **Status:** ✅ Merged **Merged:** 11/9/2024 **Merged by:** [@Tinyblargon](https://github.com/Tinyblargon) **Base:** `master` ← **Head:** `optimize1` --- ### 📝 Commits (10+) - [`dc329c7`](https://github.com/Telmate/proxmox-api-go/commit/dc329c77dc5c7a6e0db4b281dce86592f425c6ac) docs: add section about enum variables - [`21258e6`](https://github.com/Telmate/proxmox-api-go/commit/21258e6237f29c896a7eb41184aebc856c0be6ad) refactor: rename enum to contain `enum` - [`9099d6b`](https://github.com/Telmate/proxmox-api-go/commit/9099d6b3ebb7f5c809d3bc977808d530410f0c43) refactor: optimize `QemuUSB.Validate()` - [`8c82a8c`](https://github.com/Telmate/proxmox-api-go/commit/8c82a8c066fdaba4160d4450782653c95417e9bc) refactor: simplify `QemuUSB.mapToAPI()` - [`c835a57`](https://github.com/Telmate/proxmox-api-go/commit/c835a57295620a17f268802cb0b8f59f0b800104) refactor: rename error veriable - [`e80cddd`](https://github.com/Telmate/proxmox-api-go/commit/e80cddd99cf246ac790bc1ca7451cb6ff812991c) refactor: add `QemuUsbID.String()` - [`4f7c117`](https://github.com/Telmate/proxmox-api-go/commit/4f7c1179893eb5e04c774985d2ace2eca87a1f98) refactor: remove dead code - [`2341775`](https://github.com/Telmate/proxmox-api-go/commit/234177537e433eec6af3b13ed874afc7e58b5313) feat: added error constants - [`33d6d94`](https://github.com/Telmate/proxmox-api-go/commit/33d6d94fa97e229a6de7b0c4b2e9711fd04ff991) refactor: remove dead code - [`26d81e8`](https://github.com/Telmate/proxmox-api-go/commit/26d81e86cefd45a4acd11b1c1d1d7f8eded613db) refactor: should be value not pointer ### 📊 Changes **8 files changed** (+116 additions, -241 deletions) <details> <summary>View changed files</summary> 📝 `docs/style-guide/sdk.md` (+18 -2) 📝 `proxmox/config_group.go` (+17 -27) 📝 `proxmox/config_group_test.go` (+24 -42) 📝 `proxmox/config_qemu.go` (+0 -43) 📝 `proxmox/config_qemu_test.go` (+1 -1) 📝 `proxmox/config_qemu_usb.go` (+54 -124) 📝 `proxmox/config_user.go` (+1 -1) 📝 `proxmox/session.go` (+1 -1) </details> ### 📄 Description - Added to the style guide. - Optimized the internals of `QemuUSB`. - Removed dead code. - Reworked `GroupName.Validate()` to have it's errors as constants. - Changed pointer to value, as the pointer only added the need for more validation. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 00:42:09 +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#428
No description provided.