github.com/cloudfoundry-community/cloudfoundry-cli@v6.44.1-0.20240130060226-cda5ed8e89a5+incompatible/command/flag/parse.go (about)

     1  package flag
     2  
     3  import "strconv"
     4  
     5  func ParseStringToInt(str string) (int, error) {
     6  	integer64Bit, err := strconv.ParseInt(str, 0, 0)
     7  	if err != nil {
     8  		return 0, err
     9  	}
    10  	return int(integer64Bit), nil
    11  }