fix url parsing and go fmt