MCPcopy Index your code
hub / github.com/valyala/quicktemplate / validatePackageName

Function validatePackageName

parser/parser.go:895–900  ·  view source on GitHub ↗
(code []byte)

Source from the content-addressed store, hash-verified

893}
894
895func validatePackageName(code []byte) error {
896 codeStr := fmt.Sprintf("package %s", code)
897 fset := gotoken.NewFileSet()
898 _, err := goparser.ParseFile(fset, "", codeStr, 0)
899 return err
900}
901
902func validateImport(code []byte) error {
903 codeStr := fmt.Sprintf("package foo\nimport %s", code)

Callers 1

parsePackageNameMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…