strconv

    2熱度

    1回答

    我的測試處理器的代碼是在這裏: func defineHandler(w http.ResponseWriter, r *http.Request) { a := strconv.ParseInt(r.FormValue("aRows")[0:], 10, 64); b := r.FormValue("aRows"); fmt.Fprintf(w, "aRows is

    2熱度

    2回答

    我最終編寫了這樣的代碼。我需要一個正INT(其他一些函數調用),但僅parseInt函數產生的64位整數: i64, err := strconv.ParseInt(s, 10, 0) if err != nil { fmt.Println("parsing failed for", s) } i := int(i64) http://play.golang.org/p/_ef