golang.org/x/tools/gopls@v0.15.3/internal/analysis/embeddirective/doc.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 embeddirective defines an Analyzer that validates //go:embed directives. 6 // The analyzer defers fixes to its parent golang.Analyzer. 7 // 8 // # Analyzer embed 9 // 10 // embed: check //go:embed directive usage 11 // 12 // This analyzer checks that the embed package is imported if //go:embed 13 // directives are present, providing a suggested fix to add the import if 14 // it is missing. 15 // 16 // This analyzer also checks that //go:embed directives precede the 17 // declaration of a single variable. 18 package embeddirective