Extraction to global variable\const

Hi!

Is there a way to extract an expression to global const or variable?

For example:

func main() {
fmt.Println("test 123")
}

->

const testConst = "test 123"

func main() {
fmt.Println(testConst)
}

 

1 comment
Comment actions Permalink
Official comment

Hi,

It's not possible right now. Please vote for the issue to show the interest and get updates on it. 

https://youtrack.jetbrains.com/issue/GO-5137

Please sign in to leave a comment.