Create functions in go with the keyword func.

func name(param1 type1, param2, param3 type2) outputType {
	// function body here
}

Functions can have multiple returns.

func name(param1 type) (type1, type2, type2) {
	return ret1, ret2, ret3
}