functions.go 255 B

12345678910111213141516
  1. package api
  2. // Here we define our functions in plain Go
  3. import (
  4. "fmt"
  5. )
  6. func sayGoodbye() {
  7. fmt.Println("Go >> goodbye from Go!")
  8. }
  9. func concat(a string, b string) string {
  10. fmt.Printf("Go >> concatenating %q and %q\n", a, b)
  11. return a + " " + b
  12. }