Created
March 12, 2018 05:09
-
-
Save parzibyte/be9bbe9b58ee900509a95d151eb6cc38 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"strconv" | |
"fmt" | |
) | |
func main(){ | |
numeroCadena := "10" | |
numeroEntero, error := strconv.Atoi(numeroCadena) | |
if error != nil { | |
fmt.Println("Error al convertir: ", error) | |
} | |
fmt.Println(numeroEntero + 5) // Imprime 15 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment