Go Tutorial

Go Functions

Functions

Functions group reusable logic behind a name you can call anywhere.

func greet(name string) string {
  return "Hello, " + name
}
Try it Yourself
Run this GO example in your local environment or course sandbox.