Skip to content

Support extracting a struct to it's own type #2003

Open
@dlsniper

Description

@dlsniper

From the following code:

package main

func main() {
    demo := struct {
        FieldA string
    }{
        FieldA: "demo",
    }
    _ = demo
}

the struct should be extracted to:

package main

type StructName struct { // StructName should be editable before extraction is finished
    FieldA string
}

func main() {
    demo := StructName{
        FieldA: "demo",
    }
    _ = demo
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions