Gofmt your code
To format your code, you can use the gofmt tool directly:
Or you can use the "go fmt" command:
gofmt -w yourcode.go
Or you can use the "go fmt" command:
go fmt path/to/your/package
what is gofmt -s :
It simplifies the following forms
A slice expression of the form: s[a:len(s)] will be simplified to: s[a:] A range of the form: for x, _ = range v {...} will be simplified to: for x = range v {...} A range of the form: for _ = range v {...} will be simplified to: for range v {...}
Comments
Post a Comment