• Version 1.9.2
  • Published
  • 70.9 kB
  • 4 dependencies
  • Apache-2.0 license


npm i snyk-go-parser
yarn add snyk-go-parser
pnpm add snyk-go-parser


Generate a dep tree given a collection of manifests



function buildGoPkgDepTree

buildGoPkgDepTree: (
manifestFileContents: string,
lockFileContents: string,
options?: unknown
) => Promise<DepTree>;

    function buildGoVendorDepTree

    buildGoVendorDepTree: (manifestFileContents: string) => Promise<DepTree>;

      function parseGoModGraph

      parseGoModGraph: (
      goModGraphOutput: string,
      projectName?: string,
      projectVersion?: string
      ) => DepGraph;

        function parseGoModRelativeManifestReplaces

        parseGoModRelativeManifestReplaces: (goModFileContent?: string) => string[];

          function parseGoPkgConfig

          parseGoPkgConfig: (
          manifestFileContents: string,
          lockFileContents: string
          ) => Promise<GoPackageConfig>;

            function parseGoVendorConfig

            parseGoVendorConfig: (manifestFileContents: string) => Promise<GoPackageConfig>;


              interface GoModuleConfig

              interface GoModuleConfig {}

                property excludes

                excludes: ModuleAndVersion[];

                  property golangVersion

                  golangVersion?: string;

                    property moduleName

                    moduleName: string;

                      property replaces

                      replaces: Replace[];

                        property requires

                        requires: Require[];

                          interface GoPackageConfig

                          interface GoPackageConfig {}

                            property ignoredPkgs

                            ignoredPkgs?: string[];

                              property lockedVersions

                              lockedVersions: LockedDeps;

                                property packageName

                                packageName?: string;

                                  Type Aliases

                                  type GoPackageManagerType

                                  type GoPackageManagerType = 'golangdep' | 'govendor' | 'gomodules';

                                    type ModuleVersion

                                    type ModuleVersion = ModuleExactVersion | ModulePseudoVersion;

                                      Package Files (6)

                                      Dependencies (4)

                                      Dev Dependencies (12)

                                      Peer Dependencies (0)

                                      No peer dependencies.


                                      To add a badge like this badgeto your package's README, use the codes available below.

                                      You may also use to create a custom badge linking to

                                      • Markdown
                                      • HTML
                                        <a href=""><img src="" alt=""></a>