MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / parseVMID

Function parseVMID

internal/cli/guests.go:1315–1322  ·  view source on GitHub ↗

── helpers ──────────────────────────────────────────────────────────────────

(s string)

Source from the content-addressed store, hash-verified

1313// ── helpers ──────────────────────────────────────────────────────────────────
1314
1315func parseVMID(s string) (int, error) {
1316 vmid, err := strconv.Atoi(s)
1317 if err != nil || vmid <= 0 {
1318 return 0, fmt.Errorf("invalid VMID %q: must be a positive integer", s)
1319 }
1320
1321 return vmid, nil
1322}

Callers 6

runGuestsShowFunction · 0.85
runGuestsDeleteFunction · 0.85
makeLifecycleCmdFunction · 0.85
runGuestsExecFunction · 0.85
runGuestsShellFunction · 0.85
runGuestsMigrateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected