Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created April 5, 2019 19:51
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/ad5eb20d6915fecbfff2df4af60755d0 to your computer and use it in GitHub Desktop.
Save parzibyte/ad5eb20d6915fecbfff2df4af60755d0 to your computer and use it in GitHub Desktop.
package main
/*
Una simple función que suma (y que vamos a probar más adelante)
en Go
@author parzibyte
*/
import "fmt"
func main() {
resultado := sumar(1, 2)
fmt.Printf("El resultado de la suma es: %d", resultado)
}
func sumar(a int, b int) int {
return a + b
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment