Created
July 3, 2019 02:59
-
-
Save Adron/22707c9175759a43f2538abdbcd2af6d to your computer and use it in GitHub Desktop.
A sample function being called from func main.
This file contains hidden or 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 "fmt" | |
func main() { | |
var this, result int | |
var that, message string | |
this = 2 | |
that = "42" | |
result, message = exampleExecutor(this, that) | |
fmt.Printf("%s\n%d", message, result) | |
} | |
func exampleExecutor(this int, that string) (int, string) { | |
fmt.Printf("Numbers: %d, %s\n", this, that) | |
return this, "This is the result: " + that | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment