Categories
How to assign a function via var name type?
println := fmt.Println how to do it via var name type? If it's simpler, what type are the functions in go?
Answer the question
In order to leave comments, you need to log in
var f func(...interface {}) (int, error) = fmt.Println
A type declaration is not needed.var println = fmt.Println
var println = fmt.Println
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question