MCPcopy Index your code
hub / github.com/jetify-com/devbox / atoiOmitZero

Function atoiOmitZero

nix/flake/flakeref.go:585–590  ·  view source on GitHub ↗

atoiOmitZero returns 0 if s == "", otherwised it parses s as a base-10 int64.

(s string)

Source from the content-addressed store, hash-verified

583
584// atoiOmitZero returns 0 if s == "", otherwised it parses s as a base-10 int64.
585func atoiOmitZero(s string) (int64, error) {
586 if s == "" {
587 return 0, nil
588 }
589 return strconv.ParseInt(s, 10, 64)
590}
591
592// Special values for [Installable].Outputs.
593const (

Callers 1

parseURLRefFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected