• Version 1.15.0
  • Published
  • 61.9 kB
  • 5 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,
      opts?: { pruneRepeatedSubDependencies: boolean }
      ) => DepGraph;

        function parseGoModRelativeManifestReplaces

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

          function parseGoModVersionDirective

          parseGoModVersionDirective: (
          goModFileContent: string,
          strict?: boolean
          ) => string | undefined;

            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 (7)

                                        Dependencies (5)

                                        Dev Dependencies (11)

                                        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>