golang.org/x/tools/gopls@v0.15.3/internal/test/marker/testdata/suggestedfix/embeddirective.txt (about)

     1  This test checks the quick fix to add a missing "embed" import.
     2  
     3  -- embed.txt --
     4  text
     5  -- fix_import.go --
     6  package embeddirective
     7  
     8  import (
     9  	"io"
    10  	"os"
    11  )
    12  
    13  //go:embed embed.txt //@suggestedfix("//go:embed", re`must import "embed"`, fix_import)
    14  var t string
    15  
    16  func unused() {
    17  	_ = os.Stdin
    18  	_ = io.EOF
    19  }
    20  -- @fix_import/fix_import.go --
    21  @@ -4 +4 @@
    22  +	_ "embed"