golang.org/x/tools/gopls@v0.15.3/internal/analysis/deprecated/testdata/src/a/a.go (about)

     1  // Copyright 2023 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package usedeprecated
     6  
     7  import "io/ioutil" // want "\"io/ioutil\" is deprecated: .*"
     8  
     9  func x() {
    10  	_, _ = ioutil.ReadFile("") // want "ioutil.ReadFile is deprecated: As of Go 1.16, .*"
    11  	Legacy()                   // expect no deprecation notice.
    12  }
    13  
    14  // Legacy is deprecated.
    15  //
    16  // Deprecated: use X instead.
    17  func Legacy() {} // want Legacy:"Deprecated: use X instead."