Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

go functions

package main

import "fmt"

func add(int x, int y) int {
	return x + y
}

func main() {
	fmt.Println(add(42, 13))
}
Notice that the type comes after the variable name
Source by gowithgolang.com #
 
PREVIOUS NEXT
Tagged: #functions
ADD COMMENT
Topic
Name
4+6 =