Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created March 12, 2018 05:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/be9bbe9b58ee900509a95d151eb6cc38 to your computer and use it in GitHub Desktop.
Save parzibyte/be9bbe9b58ee900509a95d151eb6cc38 to your computer and use it in GitHub Desktop.
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