github.com/powerman/golang-tools@v0.1.11-0.20220410185822-5ad214d8d803/internal/lsp/testdata/extract/extract_function/extract_issue_44813.go.golden (about) 1 -- functionextraction_extract_issue_44813_6_2 -- 2 package extract 3 4 import "fmt" 5 6 func main() { 7 //@mark(exSt9, "x") 8 x := newFunction() //@mark(exEn9, "}") 9 //@extractfunc(exSt9, exEn9) 10 fmt.Printf("%x\n", x) 11 } 12 13 func newFunction() []rune { 14 x := []rune{} 15 s := "HELLO" 16 for _, c := range s { 17 x = append(x, c) 18 } 19 return x 20 } 21