add IsLocalhost utility function + go fmt
Merge pull request #51 from PatrickDropbox/master

add IsLocalhost utility function + go fmt