Function Overloading - Multiple function with the same name
- There is no function overloading in Golang
examples/redeclare-function/redeclare_function.go
package main import "fmt" func main() { } func say() { fmt.Println("Hello World") } func say(name string) { fmt.Printf("Hello %v\n", name) }
# command-line-arguments ./redeclare_function.go:12:6: say redeclared in this block previous declaration at ./redeclare_function.go:8:6