Fun With Functions
· β˜• 8 min read
Go programming language has very powerful features for functions. Let's see what all fun we can have with functions! 1. In Go, it is not required for a function to accept or return a value. We mainly use function to define a reusable code that can be called by name. Here is how we declare a simple function in Go. 1 2 3 func simpleFunction() { fmt.Println("Hello from function") } Now we can call simpleFunction from our main function.