Advertisement
Nrejve

GO Func

Jun 28th, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.30 KB | None | 0 0
  1. package main
  2.  
  3. import (
  4.     "fmt"
  5. )
  6.  
  7. func main() {
  8.     foo()
  9.     bar("James")
  10.     s1 := woo("Moneypenny")
  11.     fmt.Println(s1)
  12. }
  13.  
  14. func foo() {
  15.     fmt.Println("hello from foo")
  16. }
  17.  
  18. func bar(s string) {
  19.     fmt.Println("Hello,", s)
  20. }
  21.  
  22. func woo(st string) string {
  23.     return fmt.Sprint("Hello from woo, ", st)
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement