Looking for go Answers? Try Ask4KnowledgeBase
Looking for go Keywords? Try Ask4Keywords

Go Basic Declaration


Example

A simple function that does not accept any parameters and does not return any values:

func SayHello() {
    fmt.Println("Hello!")
}