[PR #226] [MERGED] feat: add new() method #229

Closed
opened 2026-03-03 15:30:48 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/luthermonson/go-proxmox/pull/226
Author: @sergelogvinov
Created: 12/23/2025
Status: Merged
Merged: 12/31/2025
Merged by: @luthermonson

Base: mainHead: new-method


📝 Commits (1)

📊 Changes

3 files changed (+25 additions, -0 deletions)

View changed files

📝 cluster.go (+6 -0)
📝 nodes.go (+13 -0)
📝 virtual_machine.go (+6 -0)

📄 Description

This helps reduce unnecessary API calls

Example to use:

	vm := &proxmox.VirtualMachine{}
	vm.New(c.Client, nodeName, vmID)

	if err := vm.Ping(ctx); err != nil {
		return 0, fmt.Errorf("failed to get vm %d status: %v", vmID, err)
	}

Thanks


🔄 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/luthermonson/go-proxmox/pull/226 **Author:** [@sergelogvinov](https://github.com/sergelogvinov) **Created:** 12/23/2025 **Status:** ✅ Merged **Merged:** 12/31/2025 **Merged by:** [@luthermonson](https://github.com/luthermonson) **Base:** `main` ← **Head:** `new-method` --- ### 📝 Commits (1) - [`8ce584f`](https://github.com/luthermonson/go-proxmox/commit/8ce584fdde0bf81ce77bf07a1e3566e20a8bddc7) feat: add new() method ### 📊 Changes **3 files changed** (+25 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `cluster.go` (+6 -0) 📝 `nodes.go` (+13 -0) 📝 `virtual_machine.go` (+6 -0) </details> ### 📄 Description This helps reduce unnecessary API calls Example to use: ```go vm := &proxmox.VirtualMachine{} vm.New(c.Client, nodeName, vmID) if err := vm.Ping(ctx); err != nil { return 0, fmt.Errorf("failed to get vm %d status: %v", vmID, err) } ``` Thanks --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 15:30:48 +03:00
Sign in to join this conversation.
No labels
pull-request
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/go-proxmox#229
No description provided.