github.com/v2fly/tools@v0.100.0/internal/lsp/testdata/baz/baz.go.in (about)

     1  // +build go1.11
     2  
     3  package baz
     4  
     5  import (
     6  	"golang.org/x/tools/internal/lsp/bar"
     7  
     8  	f "golang.org/x/tools/internal/lsp/foo"
     9  )
    10  
    11  var FooStruct f.StructFoo
    12  
    13  func Baz() {
    14  	defer bar.Bar() //@complete("B", Bar)
    15  	// TODO(rstambler): Test completion here.
    16  	defer bar.B
    17  	var x f.IntFoo  //@complete("n", IntFoo),typdef("x", IntFoo)
    18  	bar.Bar()       //@complete("B", Bar)
    19  }
    20  
    21  func _() {
    22  	bob := f.StructFoo{Value: 5}
    23  	if x := bob. //@complete(" //", Value)
    24  	switch true == false {
    25  		case true:
    26  			if x := bob. //@complete(" //", Value)
    27  		case false:
    28  	}
    29  	if x := bob.Va //@complete("a", Value)
    30  	switch true == true {
    31  		default:
    32  	}
    33  }