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

Function parseInt

pkg/api/network_interfaces.go:289–298  ·  view source on GitHub ↗

Helper function to parse int, assuming it might be missing in this context For a real scenario, use strconv.Atoi.

(s string)

Source from the content-addressed store, hash-verified

287// Helper function to parse int, assuming it might be missing in this context
288// For a real scenario, use strconv.Atoi.
289func parseInt(s string) (int, error) {
290 var i int
291
292 n, err := fmt.Sscan(s, &i)
293 if err != nil || n == 0 {
294 return 0, fmt.Errorf("failed to parse int: %s", s)
295 }
296
297 return i, nil
298}

Callers 9

parseIPCIDRFunction · 0.85
extendedClipboardCapsFunction · 0.85
bigIntToU8ArrayFunction · 0.85
_getKeyCodeMethod · 0.85
connectFunction · 0.85
disconnectFinishedFunction · 0.85
updateQualityFunction · 0.85
updateCompressionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected