code: func atoi(b []byte) (int, error) {
  	if len(b) > len(powers) {
  		return 0, fmt.Errorf("sam: integer overflow: %q", b)
  	}
  	var n int64
  	k := len(b) - 1
  	for i, v := range b {
  		n += int64(v-'0') * powers[k-i]
  		if int64(int(n)) != n {
  			return 0, fmt.Errorf("sam: integer overflow: %q at %d", b, i)
  		}
  	}
  	return int(n), nil
  }
docs: // atoi returns the integer interpretation of b which must be an ASCII decimal number representation.