how to use variable function in go