github.com/jhump/golang-x-tools@v0.0.0-20220218190644-4958d6d39439/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  }