kythe.io@v0.0.68-0.20240422202219-7225dbc01741/kythe/go/indexer/testdata/basic/deprecation.go (about)

     1  // Package deprecate tests deprecation.
     2  
     3  //- @+3dep defines/binding Pkg
     4  
     5  // Deprecated: dep should not be used
     6  package dep
     7  
     8  //- Pkg.node/kind package
     9  //- Pkg.tag/deprecated "dep should not be used"
    10  
    11  //- @+6topLevel defines/binding TopLevel
    12  //- TopLevel.node/kind variable
    13  //- TopLevel.tag/deprecated "topLevel has insufficient precision"
    14  //- TopLevel childof Pkg
    15  
    16  // Deprecated: topLevel has insufficient precision
    17  var topLevel int
    18  
    19  //- @+4outer defines/binding Outer
    20  //- Outer.tag/deprecated "outer has been replaced by inner"
    21  
    22  // Deprecated: outer has been replaced by inner
    23  func outer() {
    24  	//- @+6stabby defines/binding V
    25  	//- V.node/kind variable
    26  	//- V childof Outer
    27  	//- V.tag/deprecated "stabby is too sharp"
    28  
    29  	// Deprecated: stabby is too sharp
    30  	var stabby bool
    31  
    32  	_ = stabby // suppress unused variable error
    33  }
    34  
    35  //- @+6multilineDep defines/binding Func
    36  //- Func.tag/deprecated "more than one line for deprecation message"
    37  
    38  // Deprecated: more than one
    39  // line for deprecation
    40  // message
    41  func multilineDep() {
    42  }
    43  
    44  //- @+6magic defines/binding Const
    45  //- Const.node/kind constant
    46  //- Const.tag/deprecated "use technology instead"
    47  //- Const childof Pkg
    48  
    49  // Deprecated: use technology instead
    50  const magic = "beans"