I'm trying to get the following to work:
func ArticlesHandler(w http.ResponseWriter, r *http.Request) {
...
if(ValidTokenProvided(w,r)){
...
}
...
}
func ValidTokenProvided(w http.ResponseWriter, r *http.Request) {
...
return false
}
How can I pass a function as a parameter? or if I can't, what is the best way to achieve this.