Indentation in Go: tabs or spaces?
The official recommendation is formatting your code with go fmt or using the gofmt command directly gofmt -w . You can read more about it here on the golang.org blog, or from the Effective go document: Indentation We use tabs for indentation and gofmt emits them by default. Use spaces only if you must.