CodeQL library for Go
codeql/go-all 0.7.15-dev (changelog, source)
Search

Predicate package

Gets an import path that identifies a package in module mod with the given path, possibly modulo semantic import versioning.

For example, package("github.com/go-pg/pg", "types") gets an import path that can refer to "github.com/go-pg/pg/types", but also to "github.com/go-pg/pg/v10/types".

Import path

import semmle.go.Packages
string package(string mod, string path)