You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 15, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Jul 15, 2023. It is now read-only.
Need go.formatFlags to support gofmt -s simplify mode #444
Our build server enforces the use of gofmt with the simplify mode. Right now I don't see a way to pass the -s flag to the formatting tool in vscode. Can we add a go.formatFlags setting?
Example code for testing:
var final = strings.Split("a b c", " ")
var first = strings.Split("d e f", " ")
final = append(final, first[2:len(first)]...)
//gofmt -s main.go would change the previous line to
final = append(final, first[2:]...)
Activity
lukehoban commentedon Aug 21, 2016
PRs welcome for this. Should be a simple addition modelled after
go.buildFlags/go.lintFlags.Add go.formatFlags configuration parameter to pass parameters to form…
ramya-rao-a commentedon Oct 12, 2016
Greg Bray (@gbrayut) Ludwig Valda Vasquez (@bredov) This feature is now available in the latest version of the Go extension : 0.6.44
gbrayut commentedon Oct 12, 2016
Thanks! The following in my settings.json worked exactly as I wanted: