Update function to fix Go 1.0.x compatibility for Travis CI.