github.com/powerman/golang-tools@v0.1.11-0.20220410185822-5ad214d8d803/internal/lsp/testdata/snippets/literal_snippets118.go.in (about)

     1  // +build go1.18
     2  //go:build go1.18
     3  
     4  package snippets
     5  
     6  type Tree[T any] struct{}
     7  
     8  func (tree Tree[T]) Do(f func(s T)) {}
     9  
    10  func _() {
    11      _ = "func(...) {}" //@item(litFunc, "func(...) {}", "", "var")
    12  	var t Tree[string]
    13  	t.Do(fun) //@complete(")", litFunc),snippet(")", litFunc, "func(s string) {$0\\}", "func(s string) {$0\\}")
    14  }