go fmt on the file and adding panic wrapper function