Initial commit
This commit is contained in:
22
11-if/03-error-handling/01-itoa/main.go
Normal file
22
11-if/03-error-handling/01-itoa/main.go
Normal file
@ -0,0 +1,22 @@
|
||||
// For more tutorials: https://blog.learngoprogramming.com
|
||||
//
|
||||
// Copyright © 2018 Inanc Gumus
|
||||
// Learn Go Programming Course
|
||||
// License: https://creativecommons.org/licenses/by-nc-sa/4.0/
|
||||
//
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
func main() {
|
||||
// Itoa doesn't return any errors
|
||||
// So, you don't have to handle the errors for it
|
||||
|
||||
s := strconv.Itoa(42)
|
||||
|
||||
fmt.Println(s)
|
||||
}
|
Reference in New Issue
Block a user