Logo

Programming-Idioms

History of Idiom 3 > diff from v25 to v26

Edit summary for version 26 by programming-idioms.org:
[Go] Comment syntax

Version 25

2016-08-23, 13:45:18

Version 26

2016-08-23, 13:45:31

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 _{ .
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