Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Use the same err on the left hand side

package main

import (
	"fmt"
	"os"
	"strconv"
)

func main() {
	a, err := strconv.Atoi("23")
	fmt.Println(a)
	if err != nil {
		os.Exit(1)
	}
	b, err := strconv.ParseFloat("3.4", 64)
	if err != nil {
		os.Exit(1)
	}
	fmt.Println(b)
}
23
3.4