type User struct { // <- Press Ctrl+. here
Name string
Email string
Age int
}
// Transforms to:
// Name string `json:"name"`
// Email string `json:"email"`
// Age int `json:"age"`
Extract to variable
result := calculateSomething(a + b * c) // Select "a + b * c" and press Ctrl+.
// Transforms to:
// name := a + b * c
// result := calculateSomething(name)
Requirements
VS Code 1.80.0 or higher
Go installed and available in PATH (for gopls integration)