Logo

Programming-Idioms

History of Idiom 3 > diff from v24 to v25

Edit summary for version 25 by programming-idioms.org:
[Go] +Comment

Version 24

2016-08-23, 13:44:06

Version 25

2016-08-23, 13:45:18

Idiom #3 Create a procedure

Like a function which doesn't return any value, thus has only side effects (e.g. Print to standard output)

Idiom #3 Create a procedure

Like a function which doesn't return any value, thus has only side effects (e.g. Print to standard output)

Imports
import "fmt"
Imports
import "fmt"
Code
func finish(name string) {
  fmt.Println("My job here is done. Good bye " + name)
}
Code
func finish(name string) {
  fmt.Println("My job here is done. Good bye " + name)
}
Comments bubble
There is no return type in the signature, before the _{ .
Demo URL
http://play.golang.org/p/NSbp6jceZH
Demo URL
http://play.golang.org/p/NSbp6jceZH