MCPcopy Create free account
hub / github.com/driangle/taskmd / toInt

Function toInt

apps/cli/internal/cli/validate.go:337–348  ·  view source on GitHub ↗

toInt converts a viper numeric value (int, int64, float64) to int.

(v any)

Source from the content-addressed store, hash-verified

335
336// toInt converts a viper numeric value (int, int64, float64) to int.
337func toInt(v any) int {
338 switch n := v.(type) {
339 case int:
340 return n
341 case int64:
342 return int(n)
343 case float64:
344 return int(n)
345 default:
346 return 0
347 }
348}
349
350// parseScopeEntries converts raw viper scope data into typed ScopeConfig entries.
351func parseScopeEntries(scopeMap map[string]any) map[string]validator.ScopeConfig {

Callers 1

parseIDConfigFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected