Reputation: 2932
How does fmt.Println
work? Why I can pass an int
or a string
to it?
How can I make the code below work?
package main
import "fmt"
func ln(a interface{}) {
fmt.Println(a)
}
func main() {
ln(123)
ln("test")
}
Upvotes: 0
Views: 89