You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: atoi62.go
    path of file: ./repos/faygo/vendor/github.com/henrylee2cn/ameda
    
    the code of the file until where you have to start completion: package ameda

import (
	"errors"
	"math"
	"strconv"
)

// ParseUint is like ParseInt but for
    
func ParseInt(s string, base int, bitSize int) (i int64, err error) {
	// Ignore letter case
	if base <= 36 {
		return strconv.ParseInt(s, base, bitSize)
	}

	const fnParseInt = "ParseInt"

	if s == "" {
		return 0, syntaxError(fnParseInt, s)
	}

	// Pick off leading sign.
	s0 := s
	neg := false
	if s[0] == '+' {
		s = s[1:]
	} else if s[0] == '-' {
		neg = true
		s = s[1:]
	}

	// Convert unsigned and check range.
	var un uint64
	un, err = ParseUint(s, base, bitSize)
	if err != nil && err.(*strconv.NumError).Err != strconv.ErrRange {
		err.(*strconv.NumError).Func = fnParseInt
		err.(*strconv.NumError).Num = s0
		return 0, err
	}

	if bitSize == 0 {
		bitSize = int(strconv.IntSize)
	}

	cutoff := uint64(1 << uint(bitSize-1))
	if !neg && un >= cutoff {
		return int64(cutoff - 1), rangeError(fnParseInt, s0)
	}
	if neg && un > cutoff {
		return -int64(cutoff), rangeError(fnParseInt, s0)
	}
	n := int64(un)
	if neg {
		n = -n
	}
	return n, nil
}