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
It would be nice to have something like :GoInitStruct.
Proposed workflow.
Consider we have this struct:
typeCarstruct {
NamestringColorstringWeightint
}
And when I create instance of it
car:=&Car{}
I place a cursor at Car{} and run :GoInitStruct, which converts the code to:
car:=&Car{
Name: "",
Color: "",
Weight: 0,
}
[ideally] it also moves cursor to the first field value assignment [where I can start editing it immediately], and when I press Tab (for example), it moves cursor to next field assignment.
The text was updated successfully, but these errors were encountered:
josephbuchma
changed the title
feature-request: Initialize struct instance by zero values
feature-request: Initialize struct instance command (:GoInitStruct)
Sep 3, 2017
josephbuchma
changed the title
feature-request: Initialize struct instance command (:GoInitStruct)
feature-request: Initialize struct instance command
Sep 3, 2017
It would be nice to have something like
:GoInitStruct
.Proposed workflow.
Consider we have this struct:
And when I create instance of it
I place a cursor at
Car{}
and run:GoInitStruct
, which converts the code to:[ideally] it also moves cursor to the first field value assignment [where I can start editing it immediately], and when I press Tab (for example), it moves cursor to next field assignment.
The text was updated successfully, but these errors were encountered: