github.com/amarpal/go-tools@v0.0.0-20240422043104-40142f59f616/analysis/facts/deprecated/testdata/src/example.com/Deprecated/Deprecated.go (about)

     1  package pkg
     2  
     3  // Deprecated: Don't use this.
     4  func fn2() { // want fn2:`Deprecated: Don't use this\.`
     5  }
     6  
     7  // This is a function.
     8  //
     9  // Deprecated: Don't use this.
    10  //
    11  // Here is how you might use it instead.
    12  func fn3() { // want fn3:`Deprecated: Don't use this\.`
    13  }
    14  
    15  // Handle cases like:
    16  //
    17  // Taken from "os" package:
    18  //
    19  // ```
    20  // // Deprecated: Use io.SeekStart, io.SeekCurrent, and io.SeekEnd.
    21  // const (
    22  // 	SEEK_SET int = 0 // seek relative to the origin of the file
    23  // 	SEEK_CUR int = 1 // seek relative to the current offset
    24  // 	SEEK_END int = 2 // seek relative to the end
    25  // )
    26  // ```
    27  //
    28  // Here all three consts i.e., os.SEEK_SET, os.SEEK_CUR and os.SEEK_END are
    29  // deprecated and not just os.SEEK_SET.
    30  
    31  // Deprecated: Don't use this.
    32  var (
    33  	SEEK_A = 0 // want SEEK_A:`Deprecated: Don't use this\.`
    34  	SEEK_B = 1 // want SEEK_B:`Deprecated: Don't use this\.`
    35  	SEEK_C = 2 // want SEEK_C:`Deprecated: Don't use this\.`
    36  )
    37  
    38  // Deprecated: Don't use this.
    39  type (
    40  	pair struct{ x, y int }    // want pair:`Deprecated: Don't use this\.`
    41  	cube struct{ x, y, z int } // want cube:`Deprecated: Don't use this\.`
    42  )
    43  
    44  // Deprecated: Don't use this.
    45  var SEEK_D = 3 // want SEEK_D:`Deprecated: Don't use this\.`
    46  var SEEK_E = 4
    47  var SEEK_F = 5