To format your code, you can use the gofmt tool directly:
gofmt -w yourcode.go Or you can use the “go fmt” command:
go fmt path/to/your/package