diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml
index 4438fc9f..ca39c000 100644
--- a/.github/workflows/create-release.yml
+++ b/.github/workflows/create-release.yml
@@ -42,8 +42,6 @@ jobs:
uses: paketo-buildpacks/github-config/actions/tag/increment-tag@main
with:
current_version: ${{ steps.reset.outputs.current_version }}
- - name: Package Jam
- run : ./scripts/package.sh
- name: Create Draft Release
uses: paketo-buildpacks/github-config/actions/release/create@main
with:
@@ -53,22 +51,3 @@ jobs:
target_commitish: ${{ github.sha }}
name: v${{ steps.tag.outputs.tag }}
draft: true
- assets: |
- [
- {
- "path": "build/jam-darwin",
- "name": "jam-darwin",
- "content_type": "application/octet-stream"
- },
- {
- "path": "build/jam-linux",
- "name": "jam-linux",
- "content_type": "application/octet-stream"
- },
- {
- "path": "build/jam-windows.exe",
- "name": "jam-windows.exe",
- "content_type": "application/octet-stream"
- }
- ]
-
diff --git a/README.md b/README.md
index 40bc6e75..383b83d9 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,5 @@
# packit
-Checkout the Go Docs for details on how to use the sub-packages within packit:
[![GoDoc](https://img.shields.io/badge/pkg.go.dev-doc-blue)](http://pkg.go.dev/github.com/paketo-buildpacks/packit)
Package packit provides primitives for implementing a Cloud Native Buildpack
@@ -9,7 +8,7 @@ according to the specification:
## Buildpack Interface
-According to the CNB specification, the buildpack interface is composed of both
+According to the specification, the buildpack interface is composed of both
a detect and build phase. Each of these phases has a corresponding set of
packit primitives enable developers to easily implement a buildpack.
@@ -126,7 +125,6 @@ func main() {
if err != nil {
return packit.BuildResult{}, err
}
-
layer.Build = true
layer.Launch = true
@@ -207,7 +205,7 @@ the types and functions declared herein.
* [chronos](./chronos): Package chronos provides clock functionality that can be useful when developing and testing Cloud Native Buildpacks.
-* [draft](./draft): Package draft provides a mechanism for combining Buildpack Plan entries for a dependency into an single entry. The entry has layer metadata that meets all of the entries' specifications. Its version constraint is based on a user-provided prioritized list of version sources. Useful during the build phase. See [the CNB Buildpacks specification](https://github.com/buildpacks/spec/blob/main/buildpack.md#purpose-2) for context.
+* [draft](./draft): Package draft provides a service for resolving the priority of buildpack plan entries as well as consilidating build and launch requirements.
* [fakes](./fakes)
@@ -225,29 +223,7 @@ the types and functions declared herein.
## `jam` CLI
-The `packit` library comes with a command-line tool called `jam` that can be
-used to create buildpack tarball artifacts. The `jam` name is simply a play on
-the idea of "packaging" or "packing" a buildpack.
-
-`jam` comes with the following commands:
-* help : Help about any command
-* pack : package buildpack
-* summarize : summarize buildpackage
-* update-builder : update builder
-* update-buildpack : update buildpack
-* update-dependencies : update all depdendencies in a buildpack.toml according to metadata.constraints
-
-The `jam` executable can be installed by downloading the latest version from
-the [Releases](../../releases) page. Once downloaded, buildpacks can be created from
-a source repository using the `pack` command like this:
-
-```sh
-jam pack \
- --buildpack ./buildpack.toml \
- --stack io.paketo.stacks.tiny \
- --version 1.2.3 \
- --offline \
- --output ./buildpack.tgz
-```
+The `jam` CLI has been moved into its [own dedicated repository](https://github.com/paketo-buildpacks/jam). For new `jam` releases, please visit the `jam` repositories [release page](https://github.com/paketo-buildpacks/jam/releases/tag/v1.0.0).
+
---
Readme created from Go doc with [goreadme](https://github.com/posener/goreadme)
diff --git a/cargo/jam/commands/pack.go b/cargo/jam/commands/pack.go
deleted file mode 100644
index c8cb6a28..00000000
--- a/cargo/jam/commands/pack.go
+++ /dev/null
@@ -1,128 +0,0 @@
-package commands
-
-import (
- "fmt"
- "os"
- "path/filepath"
- "strings"
-
- "github.com/paketo-buildpacks/packit/cargo"
- "github.com/paketo-buildpacks/packit/cargo/jam/internal"
- "github.com/paketo-buildpacks/packit/pexec"
- "github.com/paketo-buildpacks/packit/scribe"
- "github.com/spf13/cobra"
-)
-
-type packFlags struct {
- buildpackTOMLPath string
- output string
- version string
- offline bool
- stack string
-}
-
-func pack() *cobra.Command {
- flags := &packFlags{}
- cmd := &cobra.Command{
- Use: "pack",
- Short: "package buildpack",
- RunE: func(cmd *cobra.Command, args []string) error {
- return packRun(*flags)
- },
- }
- cmd.Flags().StringVar(&flags.buildpackTOMLPath, "buildpack", "", "path to buildpack.toml")
- cmd.Flags().StringVar(&flags.output, "output", "", "path to location of output tarball")
- cmd.Flags().StringVar(&flags.version, "version", "", "version of the buildpack")
- cmd.Flags().BoolVar(&flags.offline, "offline", false, "enable offline caching of dependencies")
- cmd.Flags().StringVar(&flags.stack, "stack", "", "restricts dependencies to given stack")
-
- err := cmd.MarkFlagRequired("buildpack")
- if err != nil {
- fmt.Fprintf(os.Stderr, "Unable to mark buildpack flag as required")
- }
- err = cmd.MarkFlagRequired("output")
- if err != nil {
- fmt.Fprintf(os.Stderr, "Unable to mark output flag as required")
- }
- err = cmd.MarkFlagRequired("version")
- if err != nil {
- fmt.Fprintf(os.Stderr, "Unable to mark version flag as required")
- }
- return cmd
-}
-
-func init() {
- rootCmd.AddCommand(pack())
-}
-
-func packRun(flags packFlags) error {
- buildpackDir, err := os.MkdirTemp("", "dup-dest")
- if err != nil {
- return fmt.Errorf("unable to create temporary directory: %s", err)
- }
- defer os.RemoveAll(buildpackDir)
-
- directoryDuplicator := cargo.NewDirectoryDuplicator()
- err = directoryDuplicator.Duplicate(filepath.Dir(flags.buildpackTOMLPath), buildpackDir)
- if err != nil {
- return fmt.Errorf("failed to duplicate directory: %s", err)
- }
-
- flags.buildpackTOMLPath = filepath.Join(buildpackDir, filepath.Base(flags.buildpackTOMLPath))
-
- configParser := cargo.NewBuildpackParser()
- config, err := configParser.Parse(flags.buildpackTOMLPath)
- if err != nil {
- return fmt.Errorf("failed to parse buildpack.toml: %s", err)
- }
-
- config.Buildpack.Version = flags.version
-
- fmt.Fprintf(os.Stdout, "Packing %s %s...\n", config.Buildpack.Name, flags.version)
-
- if flags.stack != "" {
- var filteredDependencies []cargo.ConfigMetadataDependency
- for _, dep := range config.Metadata.Dependencies {
- if dep.HasStack(flags.stack) {
- filteredDependencies = append(filteredDependencies, dep)
- }
- }
-
- config.Metadata.Dependencies = filteredDependencies
- }
-
- logger := scribe.NewLogger(os.Stdout)
- bash := pexec.NewExecutable("bash")
- prePackager := internal.NewPrePackager(bash, logger, scribe.NewWriter(os.Stdout, scribe.WithIndent(2)))
- err = prePackager.Execute(config.Metadata.PrePackage, buildpackDir)
- if err != nil {
- return fmt.Errorf("failed to execute pre-packaging script %q: %s", config.Metadata.PrePackage, err)
- }
-
- if flags.offline {
- transport := cargo.NewTransport()
- dependencyCacher := internal.NewDependencyCacher(transport, logger)
- config.Metadata.Dependencies, err = dependencyCacher.Cache(buildpackDir, config.Metadata.Dependencies)
- if err != nil {
- return fmt.Errorf("failed to cache dependencies: %s", err)
- }
-
- for _, dependency := range config.Metadata.Dependencies {
- config.Metadata.IncludeFiles = append(config.Metadata.IncludeFiles, strings.TrimPrefix(dependency.URI, "file:///"))
- }
- }
-
- fileBundler := internal.NewFileBundler()
- files, err := fileBundler.Bundle(buildpackDir, config.Metadata.IncludeFiles, config)
- if err != nil {
- return fmt.Errorf("failed to bundle files: %s", err)
- }
-
- tarBuilder := internal.NewTarBuilder(logger)
- err = tarBuilder.Build(flags.output, files)
- if err != nil {
- return fmt.Errorf("failed to create output: %s", err)
- }
-
- return nil
-}
diff --git a/cargo/jam/commands/root.go b/cargo/jam/commands/root.go
deleted file mode 100644
index c2cab9fb..00000000
--- a/cargo/jam/commands/root.go
+++ /dev/null
@@ -1,13 +0,0 @@
-package commands
-
-import "github.com/spf13/cobra"
-
-var (
- rootCmd = &cobra.Command{
- Use: "jam",
- }
-)
-
-func Execute() error {
- return rootCmd.Execute()
-}
diff --git a/cargo/jam/commands/summarize.go b/cargo/jam/commands/summarize.go
deleted file mode 100644
index 166db154..00000000
--- a/cargo/jam/commands/summarize.go
+++ /dev/null
@@ -1,57 +0,0 @@
-package commands
-
-import (
- "fmt"
- "os"
-
- "github.com/paketo-buildpacks/packit/cargo/jam/internal"
- "github.com/spf13/cobra"
-)
-
-type summarizeFlags struct {
- buildpackTarballPath string
- format string
-}
-
-func summarize() *cobra.Command {
- flags := &summarizeFlags{}
- cmd := &cobra.Command{
- Use: "summarize",
- Short: "summarize buildpackage",
- RunE: func(cmd *cobra.Command, args []string) error {
- return summarizeRun(*flags)
- },
- }
- cmd.Flags().StringVar(&flags.buildpackTarballPath, "buildpack", "", "path to a buildpackage tarball (required)")
- cmd.Flags().StringVar(&flags.format, "format", "markdown", "format of output options are (markdown, json)")
-
- err := cmd.MarkFlagRequired("buildpack")
- if err != nil {
- fmt.Fprintf(os.Stderr, "Unable to mark buildpack flag as required")
- }
- return cmd
-}
-
-func init() {
- rootCmd.AddCommand(summarize())
-}
-
-func summarizeRun(flags summarizeFlags) error {
- buildpackInspector := internal.NewBuildpackInspector()
- formatter := internal.NewFormatter(os.Stdout)
- configs, err := buildpackInspector.Dependencies(flags.buildpackTarballPath)
- if err != nil {
- return fmt.Errorf("failed to inspect buildpack dependencies: %w", err)
- }
-
- switch flags.format {
- case "markdown":
- formatter.Markdown(configs)
- case "json":
- formatter.JSON(configs)
- default:
- return fmt.Errorf("unknown format %q, please choose from the following formats: markdown, json)", flags.format)
- }
-
- return nil
-}
diff --git a/cargo/jam/commands/update_builder.go b/cargo/jam/commands/update_builder.go
deleted file mode 100644
index cc428046..00000000
--- a/cargo/jam/commands/update_builder.go
+++ /dev/null
@@ -1,90 +0,0 @@
-package commands
-
-import (
- "fmt"
- "os"
-
- "github.com/paketo-buildpacks/packit/cargo/jam/internal"
- "github.com/spf13/cobra"
-)
-
-type updateBuilderFlags struct {
- builderFile string
- lifecycleURI string
-}
-
-func updateBuilder() *cobra.Command {
- flags := &updateBuilderFlags{}
- cmd := &cobra.Command{
- Use: "update-builder",
- Short: "update builder",
- RunE: func(cmd *cobra.Command, args []string) error {
- return updateBuilderRun(*flags)
- },
- }
- cmd.Flags().StringVar(&flags.builderFile, "builder-file", "", "path to the builder.toml file (required)")
- cmd.Flags().StringVar(&flags.lifecycleURI, "lifecycle-uri", "index.docker.io/buildpacksio/lifecycle", "URI for lifecycle image (optional: default=index.docker.io/buildpacksio/lifecycle)")
-
- err := cmd.MarkFlagRequired("builder-file")
- if err != nil {
- fmt.Fprintf(os.Stderr, "Unable to mark builder-file flag as required")
- }
- return cmd
-}
-
-func init() {
- rootCmd.AddCommand(updateBuilder())
-}
-
-func updateBuilderRun(flags updateBuilderFlags) error {
- builder, err := internal.ParseBuilderConfig(flags.builderFile)
- if err != nil {
- return err
- }
-
- for i, buildpack := range builder.Buildpacks {
- image, err := internal.FindLatestImage(buildpack.URI)
- if err != nil {
- return err
- }
-
- builder.Buildpacks[i].Version = image.Version
- builder.Buildpacks[i].URI = fmt.Sprintf("%s:%s", image.Name, image.Version)
-
- buildpackageID, err := internal.GetBuildpackageID(buildpack.URI)
- if err != nil {
- return fmt.Errorf("failed to get buildpackage ID for %s: %w", buildpack.URI, err)
- }
-
- for j, order := range builder.Order {
- for k, group := range order.Group {
- if group.ID == buildpackageID {
- if builder.Order[j].Group[k].Version != "" {
- builder.Order[j].Group[k].Version = image.Version
- }
- }
- }
- }
- }
-
- lifecycleImage, err := internal.FindLatestImage(flags.lifecycleURI)
- if err != nil {
- return err
- }
-
- builder.Lifecycle.Version = lifecycleImage.Version
-
- buildImage, err := internal.FindLatestBuildImage(builder.Stack.RunImage, builder.Stack.BuildImage)
- if err != nil {
- return err
- }
-
- builder.Stack.BuildImage = fmt.Sprintf("%s:%s", buildImage.Name, buildImage.Version)
-
- err = internal.OverwriteBuilderConfig(flags.builderFile, builder)
- if err != nil {
- return err
- }
-
- return nil
-}
diff --git a/cargo/jam/commands/update_buildpack.go b/cargo/jam/commands/update_buildpack.go
deleted file mode 100644
index 4db2f3fe..00000000
--- a/cargo/jam/commands/update_buildpack.go
+++ /dev/null
@@ -1,87 +0,0 @@
-package commands
-
-import (
- "fmt"
- "os"
-
- "github.com/paketo-buildpacks/packit/cargo/jam/internal"
- "github.com/spf13/cobra"
-)
-
-type updateBuildpackFlags struct {
- buildpackFile string
- packageFile string
-}
-
-func updateBuildpack() *cobra.Command {
- flags := &updateBuildpackFlags{}
- cmd := &cobra.Command{
- Use: "update-buildpack",
- Short: "update buildpack",
- RunE: func(cmd *cobra.Command, args []string) error {
- return updateBuildpackRun(*flags)
- },
- }
- cmd.Flags().StringVar(&flags.buildpackFile, "buildpack-file", "", "path to the buildpack.toml file (required)")
- cmd.Flags().StringVar(&flags.packageFile, "package-file", "", "path to the package.toml file (required)")
-
- err := cmd.MarkFlagRequired("buildpack-file")
- if err != nil {
- fmt.Fprintf(os.Stderr, "Unable to mark buildpack-file flag as required")
- }
- err = cmd.MarkFlagRequired("package-file")
- if err != nil {
- fmt.Fprintf(os.Stderr, "Unable to mark package-file flag as required")
- }
- return cmd
-}
-
-func init() {
- rootCmd.AddCommand(updateBuildpack())
-}
-
-func updateBuildpackRun(flags updateBuildpackFlags) error {
- bp, err := internal.ParseBuildpackConfig(flags.buildpackFile)
- if err != nil {
- return err
- }
-
- pkg, err := internal.ParsePackageConfig(flags.packageFile)
- if err != nil {
- return err
- }
-
- for i, dependency := range pkg.Dependencies {
- image, err := internal.FindLatestImage(dependency.URI)
- if err != nil {
- return err
- }
-
- pkg.Dependencies[i].URI = fmt.Sprintf("%s:%s", image.Name, image.Version)
-
- buildpackageID, err := internal.GetBuildpackageID(dependency.URI)
- if err != nil {
- return fmt.Errorf("failed to get buildpackage ID for %s: %w", dependency.URI, err)
- }
-
- for j, order := range bp.Order {
- for k, group := range order.Group {
- if group.ID == buildpackageID {
- bp.Order[j].Group[k].Version = image.Version
- }
- }
- }
- }
-
- err = internal.OverwriteBuildpackConfig(flags.buildpackFile, bp)
- if err != nil {
- return err
- }
-
- err = internal.OverwritePackageConfig(flags.packageFile, pkg)
- if err != nil {
- return err
- }
-
- return nil
-}
diff --git a/cargo/jam/commands/update_dependencies.go b/cargo/jam/commands/update_dependencies.go
deleted file mode 100644
index 42ec03f9..00000000
--- a/cargo/jam/commands/update_dependencies.go
+++ /dev/null
@@ -1,95 +0,0 @@
-package commands
-
-import (
- "fmt"
- "os"
-
- "github.com/paketo-buildpacks/packit/cargo"
- "github.com/paketo-buildpacks/packit/cargo/jam/internal"
- "github.com/spf13/cobra"
-)
-
-type updateDependenciesFlags struct {
- buildpackFile string
- api string
-}
-
-func updateDependencies() *cobra.Command {
- flags := &updateDependenciesFlags{}
- cmd := &cobra.Command{
- Use: "update-dependencies",
- Short: "updates all depdendencies in a buildpack.toml according to metadata.constraints",
- RunE: func(cmd *cobra.Command, args []string) error {
- return updateDependenciesRun(*flags)
- },
- }
- cmd.Flags().StringVar(&flags.buildpackFile, "buildpack-file", "", "path to the buildpack.toml file (required)")
- cmd.Flags().StringVar(&flags.api, "api", "https://api.deps.paketo.io", "api to query for dependencies")
-
- err := cmd.MarkFlagRequired("buildpack-file")
- if err != nil {
- fmt.Fprintf(os.Stderr, "Unable to mark buildpack-file flag as required")
- }
- return cmd
-}
-
-func init() {
- rootCmd.AddCommand(updateDependencies())
-}
-
-func updateDependenciesRun(flags updateDependenciesFlags) error {
- configParser := cargo.NewBuildpackParser()
- config, err := configParser.Parse(flags.buildpackFile)
- if err != nil {
- return fmt.Errorf("failed to parse buildpack.toml: %s", err)
- }
-
- api := flags.api
-
- // All internal.Dependencies from the dep-server
- allDependencies := map[string][]internal.Dependency{}
- // All cargo.ConfigMetadataDependencies that match one of the given constraints
- var matchingDependencies []cargo.ConfigMetadataDependency
-
- for _, constraint := range config.Metadata.DependencyConstraints {
- // Only query the API once per unique dependency
- dependencies, ok := allDependencies[constraint.ID]
- if !ok {
- var err error
- fmt.Printf("reaching out to %s/v1/dependency?name=%s", api, constraint.ID)
- dependencies, err = internal.GetAllDependencies(api, constraint.ID)
- if err != nil {
- return err
- }
- allDependencies[constraint.ID] = dependencies
- }
-
- // Manually lookup the existent dependency name from the buildpack.toml since this
- // isn't specified via the dep-server
- dependencyName := internal.FindDependencyName(constraint.ID, config)
-
- // Filter allDependencies for only those that match the constraint
- mds, err := internal.GetDependenciesWithinConstraint(dependencies, constraint, dependencyName)
- if err != nil {
- return err
- }
- matchingDependencies = append(matchingDependencies, mds...)
- }
-
- if len(matchingDependencies) > 0 {
- config.Metadata.Dependencies = matchingDependencies
- }
-
- file, err := os.OpenFile(flags.buildpackFile, os.O_RDWR|os.O_TRUNC, 0600)
- if err != nil {
- return fmt.Errorf("failed to open buildpack config file: %w", err)
- }
- defer file.Close()
-
- err = cargo.EncodeConfig(file, config)
- if err != nil {
- return fmt.Errorf("failed to write buildpack config: %w", err)
- }
-
- return nil
-}
diff --git a/cargo/jam/errors_test.go b/cargo/jam/errors_test.go
deleted file mode 100644
index de8ac89c..00000000
--- a/cargo/jam/errors_test.go
+++ /dev/null
@@ -1,53 +0,0 @@
-package main_test
-
-import (
- "bytes"
- "os/exec"
- "testing"
-
- "github.com/onsi/gomega/gbytes"
- "github.com/onsi/gomega/gexec"
- "github.com/sclevine/spec"
-
- . "github.com/onsi/gomega"
-)
-
-func testErrors(t *testing.T, context spec.G, it spec.S) {
- var (
- withT = NewWithT(t)
- Expect = withT.Expect
- Eventually = withT.Eventually
-
- buffer *bytes.Buffer
- )
-
- it.Before(func() {
- buffer = bytes.NewBuffer(nil)
- })
-
- context("failure cases", func() {
- context("when there is no command", func() {
- it("prints an error message", func() {
- command := exec.Command(path)
- session, err := gexec.Start(command, buffer, buffer)
- Expect(err).NotTo(HaveOccurred())
- Eventually(session).Should(gexec.Exit(0), func() string { return buffer.String() })
-
- Expect(session.Out).To(gbytes.Say("Usage"))
- Expect(session.Out).To(gbytes.Say("Available Commands"))
- Expect(session.Out).To(gbytes.Say("for more information about a command"))
- })
- })
-
- context("when the given command is unknown", func() {
- it("prints an error message", func() {
- command := exec.Command(path, "some-unknown-command")
- session, err := gexec.Start(command, buffer, buffer)
- Expect(err).NotTo(HaveOccurred())
- Eventually(session).Should(gexec.Exit(1), func() string { return buffer.String() })
-
- Expect(string(session.Err.Contents())).To(ContainSubstring("Error: unknown command \"some-unknown-command\" for \"jam\""))
- })
- })
- })
-}
diff --git a/cargo/jam/init_test.go b/cargo/jam/init_test.go
deleted file mode 100644
index abcf68ff..00000000
--- a/cargo/jam/init_test.go
+++ /dev/null
@@ -1,108 +0,0 @@
-package main_test
-
-import (
- "archive/tar"
- "bytes"
- "compress/gzip"
- "fmt"
- "io"
- "os"
- "sync"
- "testing"
- "time"
-
- "github.com/onsi/gomega/gexec"
- "github.com/sclevine/spec"
- "github.com/sclevine/spec/report"
-
- . "github.com/onsi/gomega"
-)
-
-var path string
-
-func TestUnitJam(t *testing.T) {
- SetDefaultEventuallyTimeout(10 * time.Second)
-
- suite := spec.New("cargo/jam", spec.Report(report.Terminal{}))
- suite("Errors", testErrors)
- suite("pack", testPack)
- suite("summarize", testSummarize)
- suite("update-builder", testUpdateBuilder)
- suite("update-buildpack", testUpdateBuildpack)
- suite("update-dependencies", testUpdateDependencies)
-
- suite.Before(func(t *testing.T) {
- var (
- Expect = NewWithT(t).Expect
- err error
- )
-
- path, err = gexec.Build("github.com/paketo-buildpacks/packit/cargo/jam")
- Expect(err).NotTo(HaveOccurred())
- })
-
- suite.After(func(t *testing.T) {
- gexec.CleanupBuildArtifacts()
- })
-
- suite.Run(t)
-}
-
-func ExtractFile(file *os.File, name string) ([]byte, *tar.Header, error) {
- _, err := file.Seek(0, 0)
- if err != nil {
- return nil, nil, err
- }
-
- //TODO: Replace me with decompression library
- gzr, err := gzip.NewReader(file)
- if err != nil {
- return nil, nil, err
- }
- defer gzr.Close()
-
- tr := tar.NewReader(gzr)
-
- for {
- hdr, err := tr.Next()
- if err != nil {
- if err == io.EOF {
- break
- }
- return nil, nil, err
- }
-
- if hdr.Name == name {
- contents, err := io.ReadAll(tr)
- if err != nil {
- return nil, nil, err
- }
-
- return contents, hdr, nil
- }
-
- }
-
- return nil, nil, fmt.Errorf("no such file: %s", name)
-}
-
-type Buffer struct {
- b bytes.Buffer
- m sync.Mutex
-}
-
-func (b *Buffer) Read(p []byte) (n int, err error) {
- b.m.Lock()
- defer b.m.Unlock()
- return b.b.Read(p)
-}
-func (b *Buffer) Write(p []byte) (n int, err error) {
- b.m.Lock()
- defer b.m.Unlock()
- return b.b.Write(p)
-}
-func (b *Buffer) String() string {
- b.m.Lock()
- defer b.m.Unlock()
- return b.b.String()
-}
diff --git a/cargo/jam/internal/builder_config.go b/cargo/jam/internal/builder_config.go
deleted file mode 100644
index 31345491..00000000
--- a/cargo/jam/internal/builder_config.go
+++ /dev/null
@@ -1,109 +0,0 @@
-package internal
-
-import (
- "fmt"
- "net/url"
- "os"
- "strings"
-
- "github.com/pelletier/go-toml"
-)
-
-type BuilderConfig struct {
- Description string `toml:"description"`
- Buildpacks []BuilderConfigBuildpack `toml:"buildpacks"`
- Lifecycle BuilderConfigLifecycle `toml:"lifecycle"`
- Order []BuilderConfigOrder `toml:"order"`
- Stack BuilderConfigStack `toml:"stack"`
-}
-
-type BuilderConfigBuildpack struct {
- URI string `toml:"uri"`
- Version string `toml:"version"`
-}
-
-type BuilderConfigLifecycle struct {
- Version string `toml:"version"`
-}
-
-type BuilderConfigOrder struct {
- Group []BuilderConfigOrderGroup `toml:"group"`
-}
-
-type BuilderConfigOrderGroup struct {
- ID string `toml:"id"`
- Version string `toml:"version,omitempty"`
- Optional bool `toml:"optional,omitempty"`
-}
-type BuilderConfigStack struct {
- ID string `toml:"id"`
- BuildImage string `toml:"build-image"`
- RunImage string `toml:"run-image"`
- RunImageMirrors []string `toml:"run-image-mirrors"`
-}
-
-// Note: this is to support that buildpackages can refer to this field as `image` or `uri`.
-func (b *BuilderConfigBuildpack) UnmarshalTOML(v interface{}) error {
- if m, ok := v.(map[string]interface{}); ok {
- if image, ok := m["image"].(string); ok {
- b.URI = image
- }
-
- if uri, ok := m["uri"].(string); ok {
- b.URI = uri
- }
-
- if version, ok := m["version"].(string); ok {
- b.Version = version
- }
- }
-
- if b.URI != "" {
- uri, err := url.Parse(b.URI)
- if err != nil {
- return err
- }
-
- uri.Scheme = ""
-
- b.URI = strings.TrimPrefix(uri.String(), "//")
- }
-
- return nil
-}
-
-func ParseBuilderConfig(path string) (BuilderConfig, error) {
- file, err := os.Open(path)
- if err != nil {
- return BuilderConfig{}, fmt.Errorf("failed to open builder config file: %w", err)
- }
- defer file.Close()
-
- var config BuilderConfig
- err = toml.NewDecoder(file).Decode(&config)
- if err != nil {
- return BuilderConfig{}, fmt.Errorf("failed to parse builder config: %w", err)
- }
-
- return config, nil
-}
-
-func OverwriteBuilderConfig(path string, config BuilderConfig) error {
- for i, buildpack := range config.Buildpacks {
- if !strings.HasPrefix(buildpack.URI, "docker://") {
- config.Buildpacks[i].URI = fmt.Sprintf("docker://%s", buildpack.URI)
- }
- }
-
- file, err := os.OpenFile(path, os.O_RDWR|os.O_TRUNC, 0600)
- if err != nil {
- return fmt.Errorf("failed to open builder config file: %w", err)
- }
-
- err = toml.NewEncoder(file).Encode(config)
- if err != nil {
- return fmt.Errorf("failed to write builder config: %w", err)
- }
-
- return nil
-}
diff --git a/cargo/jam/internal/builder_config_test.go b/cargo/jam/internal/builder_config_test.go
deleted file mode 100644
index a9a298c9..00000000
--- a/cargo/jam/internal/builder_config_test.go
+++ /dev/null
@@ -1,273 +0,0 @@
-package internal_test
-
-import (
- "os"
- "testing"
-
- "github.com/paketo-buildpacks/packit/cargo/jam/internal"
- "github.com/sclevine/spec"
-
- . "github.com/onsi/gomega"
- . "github.com/paketo-buildpacks/packit/matchers"
-)
-
-func testBuilderConfig(t *testing.T, context spec.G, it spec.S) {
- var (
- Expect = NewWithT(t).Expect
-
- path string
- )
-
- context("ParsePackageConfig", func() {
- it.Before(func() {
- file, err := os.CreateTemp("", "package.toml")
- Expect(err).NotTo(HaveOccurred())
- defer file.Close()
-
- _, err = file.WriteString(`
-description = "Some description"
-
-[[buildpacks]]
- uri = "docker://some-registry/some-repository/some-buildpack-id:0.0.10"
- version = "0.0.10"
-
-[[buildpacks]]
- image = "some-registry/some-repository/other-buildpack-id:0.20.22"
- version = "0.20.22"
-
-[lifecycle]
- version = "0.10.2"
-
-[[order]]
-
- [[order.group]]
- id = "some-repository/other-buildpack-id"
-
-[[order]]
-
- [[order.group]]
- id = "some-repository/some-buildpack-id"
- version = "0.0.10"
- optional = true
-
-[stack]
- id = "io.paketo.stacks.some-stack"
- build-image = "some-registry/somerepository/build:1.2.3-some-cnb"
- run-image = "some-registry/somerepository/run:some-cnb"
- run-image-mirrors = ["some-registry/some-repository/run:some-cnb"]
- `)
- Expect(err).NotTo(HaveOccurred())
-
- path = file.Name()
- })
-
- it.After(func() {
- Expect(os.RemoveAll(path)).To(Succeed())
- })
-
- it("parses the builder.toml configuration", func() {
- config, err := internal.ParseBuilderConfig(path)
- Expect(err).NotTo(HaveOccurred())
- Expect(config).To(Equal(internal.BuilderConfig{
- Description: "Some description",
- Buildpacks: []internal.BuilderConfigBuildpack{
- {
- URI: "some-registry/some-repository/some-buildpack-id:0.0.10",
- Version: "0.0.10",
- },
- {
- URI: "some-registry/some-repository/other-buildpack-id:0.20.22",
- Version: "0.20.22",
- },
- },
- Lifecycle: internal.BuilderConfigLifecycle{
- Version: "0.10.2",
- },
- Order: []internal.BuilderConfigOrder{
- {
- Group: []internal.BuilderConfigOrderGroup{
- {
- ID: "some-repository/other-buildpack-id",
- },
- },
- },
- {
- Group: []internal.BuilderConfigOrderGroup{
- {
- ID: "some-repository/some-buildpack-id",
- Version: "0.0.10",
- Optional: true,
- },
- },
- },
- },
- Stack: internal.BuilderConfigStack{
- ID: "io.paketo.stacks.some-stack",
- BuildImage: "some-registry/somerepository/build:1.2.3-some-cnb",
- RunImage: "some-registry/somerepository/run:some-cnb",
- RunImageMirrors: []string{"some-registry/some-repository/run:some-cnb"},
- },
- }))
- })
-
- context("failure cases", func() {
- context("when the file cannot be opened", func() {
- it.Before(func() {
- Expect(os.Remove(path)).To(Succeed())
- })
-
- it("returns an error", func() {
- _, err := internal.ParseBuilderConfig(path)
- Expect(err).To(MatchError(ContainSubstring("failed to open builder config file:")))
- Expect(err).To(MatchError(ContainSubstring("no such file or directory")))
- })
- })
- })
-
- context("when the file contents cannot be parsed", func() {
- it.Before(func() {
- Expect(os.WriteFile(path, []byte("%%%"), 0600)).To(Succeed())
- })
-
- it("returns an error", func() {
- _, err := internal.ParseBuilderConfig(path)
- Expect(err).To(MatchError(ContainSubstring("failed to parse builder config:")))
- Expect(err).To(MatchError(ContainSubstring("keys cannot contain % character")))
- })
- })
-
- context("when a dependency uri is not valid", func() {
- it.Before(func() {
- Expect(os.WriteFile(path, []byte(`
-[[buildpacks]]
- uri = "docker://some-registry/some-repository/some-buildpack-id:0.0.10"
- version = "0.0.10"
-
-[[buildpacks]]
- image = "some-registry/some-repository/other-buildpack-id:0.20.22"
- version = "0.20.22"
-
-[[buildpacks]]
- uri = "%%%"
- version = "1.2.3"
- `), 0600)).To(Succeed())
- })
-
- it("returns an error", func() {
- _, err := internal.ParseBuilderConfig(path)
- Expect(err).To(MatchError(ContainSubstring("failed to parse builder config:")))
- Expect(err).To(MatchError(ContainSubstring("invalid URL escape")))
- })
- })
- })
-
- context("OverwritePackageConfig", func() {
- it.Before(func() {
- file, err := os.CreateTemp("", "builder.toml")
- Expect(err).NotTo(HaveOccurred())
- defer file.Close()
-
- _, err = file.WriteString(`previous contents of the file`)
- Expect(err).NotTo(HaveOccurred())
-
- path = file.Name()
- })
-
- it.After(func() {
- Expect(os.RemoveAll(path)).To(Succeed())
- })
-
- it("overwrites the package.toml configuration", func() {
- err := internal.OverwriteBuilderConfig(path, internal.BuilderConfig{
- Description: "Some description",
- Buildpacks: []internal.BuilderConfigBuildpack{
- {
- URI: "some-registry/some-repository/some-buildpack-id:0.0.10",
- Version: "0.0.10",
- },
- {
- URI: "some-registry/some-repository/other-buildpack-id:0.20.22",
- Version: "0.20.22",
- },
- },
- Lifecycle: internal.BuilderConfigLifecycle{
- Version: "0.10.2",
- },
- Order: []internal.BuilderConfigOrder{
- {
- Group: []internal.BuilderConfigOrderGroup{
- {
- ID: "some-repository/other-buildpack-id",
- Version: "0.20.22",
- },
- },
- },
- {
- Group: []internal.BuilderConfigOrderGroup{
- {
- ID: "some-repository/some-buildpack-id",
- Version: "0.0.10",
- },
- },
- },
- },
- Stack: internal.BuilderConfigStack{
- ID: "io.paketo.stacks.some-stack",
- BuildImage: "some-registry/somerepository/build:1.2.3-some-cnb",
- RunImage: "some-registry/somerepository/run:some-cnb",
- RunImageMirrors: []string{"some-registry/some-repository/run:some-cnb"},
- },
- })
- Expect(err).NotTo(HaveOccurred())
-
- contents, err := os.ReadFile(path)
- Expect(err).NotTo(HaveOccurred())
- Expect(string(contents)).To(MatchTOML(`
-description = "Some description"
-
-[[buildpacks]]
- uri = "docker://some-registry/some-repository/some-buildpack-id:0.0.10"
- version = "0.0.10"
-
-[[buildpacks]]
- uri = "docker://some-registry/some-repository/other-buildpack-id:0.20.22"
- version = "0.20.22"
-
-[lifecycle]
- version = "0.10.2"
-
-[[order]]
-
- [[order.group]]
- id = "some-repository/other-buildpack-id"
- version = "0.20.22"
-
-[[order]]
-
- [[order.group]]
- id = "some-repository/some-buildpack-id"
- version = "0.0.10"
-
-[stack]
- id = "io.paketo.stacks.some-stack"
- build-image = "some-registry/somerepository/build:1.2.3-some-cnb"
- run-image = "some-registry/somerepository/run:some-cnb"
- run-image-mirrors = ["some-registry/some-repository/run:some-cnb"]
- `))
- })
-
- context("failure cases", func() {
- context("when the file cannot be opened", func() {
- it.Before(func() {
- Expect(os.Remove(path)).To(Succeed())
- })
-
- it("returns an error", func() {
- err := internal.OverwriteBuilderConfig(path, internal.BuilderConfig{})
- Expect(err).To(MatchError(ContainSubstring("failed to open builder config file:")))
- Expect(err).To(MatchError(ContainSubstring("no such file or directory")))
- })
- })
- })
- })
-}
diff --git a/cargo/jam/internal/buildpack_config.go b/cargo/jam/internal/buildpack_config.go
deleted file mode 100644
index 4091aff7..00000000
--- a/cargo/jam/internal/buildpack_config.go
+++ /dev/null
@@ -1,56 +0,0 @@
-package internal
-
-import (
- "fmt"
- "os"
-
- "github.com/pelletier/go-toml"
-)
-
-type BuildpackConfig struct {
- API interface{} `toml:"api"`
- Buildpack interface{} `toml:"buildpack"`
- Metadata interface{} `toml:"metadata"`
- Order []BuildpackConfigOrder `toml:"order"`
-}
-
-type BuildpackConfigOrder struct {
- Group []BuildpackConfigOrderGroup `toml:"group"`
-}
-
-type BuildpackConfigOrderGroup struct {
- ID string `toml:"id"`
- Version string `toml:"version,omitempty"`
- Optional bool `toml:"optional,omitempty"`
-}
-
-func ParseBuildpackConfig(path string) (BuildpackConfig, error) {
- file, err := os.Open(path)
- if err != nil {
- return BuildpackConfig{}, fmt.Errorf("failed to open buildpack config file: %w", err)
- }
- defer file.Close()
-
- var config BuildpackConfig
- err = toml.NewDecoder(file).Decode(&config)
- if err != nil {
- return BuildpackConfig{}, fmt.Errorf("failed to parse buildpack config: %w", err)
- }
-
- return config, nil
-}
-
-func OverwriteBuildpackConfig(path string, config BuildpackConfig) error {
- file, err := os.OpenFile(path, os.O_RDWR|os.O_TRUNC, 0600)
- if err != nil {
- return fmt.Errorf("failed to open buildpack config file: %w", err)
- }
- defer file.Close()
-
- err = toml.NewEncoder(file).Encode(config)
- if err != nil {
- return fmt.Errorf("failed to write buildpack config: %w", err)
- }
-
- return nil
-}
diff --git a/cargo/jam/internal/buildpack_config_test.go b/cargo/jam/internal/buildpack_config_test.go
deleted file mode 100644
index cc430561..00000000
--- a/cargo/jam/internal/buildpack_config_test.go
+++ /dev/null
@@ -1,233 +0,0 @@
-package internal_test
-
-import (
- "os"
- "testing"
-
- "github.com/paketo-buildpacks/packit/cargo/jam/internal"
- "github.com/sclevine/spec"
-
- . "github.com/onsi/gomega"
- . "github.com/paketo-buildpacks/packit/matchers"
-)
-
-func testBuildpackConfig(t *testing.T, context spec.G, it spec.S) {
- var (
- Expect = NewWithT(t).Expect
-
- path string
- )
-
- context("ParseBuildpackConfig", func() {
- it.Before(func() {
- file, err := os.CreateTemp("", "buildpack.toml")
- Expect(err).NotTo(HaveOccurred())
- defer file.Close()
-
- _, err = file.WriteString(`
- api = "0.2"
-
- [buildpack]
- id = "some-composite-buildpack"
- name = "Some Composite Buildpack"
- version = "some-composite-buildpack-version"
-
- [metadata]
- include-files = ["buildpack.toml"]
-
- [[order]]
- [[order.group]]
- id = "some-repository/some-buildpack-id"
- version = "0.20.1"
-
- [[order.group]]
- id = "some-repository/last-buildpack-id"
-
- [[order]]
- [[order.group]]
- id = "some-repository/other-buildpack-id"
- version = "0.1.0"
- optional = true
- `)
- Expect(err).NotTo(HaveOccurred())
-
- path = file.Name()
- })
-
- it.After(func() {
- Expect(os.RemoveAll(path)).To(Succeed())
- })
-
- it("parses the buildpack.toml configuration", func() {
- config, err := internal.ParseBuildpackConfig(path)
- Expect(err).NotTo(HaveOccurred())
- Expect(config).To(Equal(internal.BuildpackConfig{
- API: "0.2",
- Buildpack: map[string]interface{}{
- "id": "some-composite-buildpack",
- "name": "Some Composite Buildpack",
- "version": "some-composite-buildpack-version",
- },
- Metadata: map[string]interface{}{
- "include-files": []interface{}{"buildpack.toml"},
- },
- Order: []internal.BuildpackConfigOrder{
- {
- Group: []internal.BuildpackConfigOrderGroup{
- {
- ID: "some-repository/some-buildpack-id",
- Version: "0.20.1",
- },
- {
- ID: "some-repository/last-buildpack-id",
- },
- },
- },
- {
- Group: []internal.BuildpackConfigOrderGroup{
- {
- ID: "some-repository/other-buildpack-id",
- Version: "0.1.0",
- Optional: true,
- },
- },
- },
- },
- }))
- })
-
- context("failure cases", func() {
- context("when the file cannot be opened", func() {
- it.Before(func() {
- Expect(os.Remove(path)).To(Succeed())
- })
-
- it("returns an error", func() {
- _, err := internal.ParseBuildpackConfig(path)
- Expect(err).To(MatchError(ContainSubstring("failed to open buildpack config file:")))
- Expect(err).To(MatchError(ContainSubstring("no such file or directory")))
- })
- })
-
- context("when the file contents cannot be parsed", func() {
- it.Before(func() {
- Expect(os.WriteFile(path, []byte("%%%"), 0600)).To(Succeed())
- })
-
- it("returns an error", func() {
- _, err := internal.ParseBuildpackConfig(path)
- Expect(err).To(MatchError(ContainSubstring("failed to parse buildpack config:")))
- Expect(err).To(MatchError(ContainSubstring("keys cannot contain % character")))
- })
- })
- })
- })
-
- context("OverwriteBuildpackConfig", func() {
- it.Before(func() {
- file, err := os.CreateTemp("", "buildpack.toml")
- Expect(err).NotTo(HaveOccurred())
- defer file.Close()
-
- _, err = file.WriteString(`previous contents of the file`)
- Expect(err).NotTo(HaveOccurred())
-
- path = file.Name()
- })
-
- it.After(func() {
- Expect(os.RemoveAll(path)).To(Succeed())
- })
-
- it("overwrites the buildpack.toml configuration", func() {
- err := internal.OverwriteBuildpackConfig(path, internal.BuildpackConfig{
- API: "0.2",
- Buildpack: map[string]interface{}{
- "id": "some-composite-buildpack",
- "name": "Some Composite Buildpack",
- "version": "some-composite-buildpack-version",
- },
- Metadata: map[string]interface{}{
- "include-files": []interface{}{"buildpack.toml"},
- },
- Order: []internal.BuildpackConfigOrder{
- {
- Group: []internal.BuildpackConfigOrderGroup{
- {
- ID: "some-repository/some-buildpack-id",
- Version: "0.20.1",
- },
- {
- ID: "some-repository/last-buildpack-id",
- Version: "0.2.0",
- },
- },
- },
- {
- Group: []internal.BuildpackConfigOrderGroup{
- {
- ID: "some-repository/other-buildpack-id",
- Version: "0.1.0",
- Optional: true,
- },
- },
- },
- },
- })
- Expect(err).NotTo(HaveOccurred())
-
- contents, err := os.ReadFile(path)
- Expect(err).NotTo(HaveOccurred())
- Expect(string(contents)).To(MatchTOML(`
- api = "0.2"
-
- [buildpack]
- id = "some-composite-buildpack"
- name = "Some Composite Buildpack"
- version = "some-composite-buildpack-version"
-
- [metadata]
- include-files = ["buildpack.toml"]
-
- [[order]]
- [[order.group]]
- id = "some-repository/some-buildpack-id"
- version = "0.20.1"
-
- [[order.group]]
- id = "some-repository/last-buildpack-id"
- version = "0.2.0"
-
- [[order]]
- [[order.group]]
- id = "some-repository/other-buildpack-id"
- version = "0.1.0"
- optional = true
- `))
- })
-
- context("failure cases", func() {
- context("when the file cannot be opened", func() {
- it.Before(func() {
- Expect(os.Remove(path)).To(Succeed())
- })
-
- it("returns an error", func() {
- err := internal.OverwriteBuildpackConfig(path, internal.BuildpackConfig{})
- Expect(err).To(MatchError(ContainSubstring("failed to open buildpack config file:")))
- Expect(err).To(MatchError(ContainSubstring("no such file or directory")))
- })
- })
-
- context("when the config cannot be written", func() {
- it("returns an error", func() {
- err := internal.OverwriteBuildpackConfig(path, internal.BuildpackConfig{
- API: func() {},
- })
- Expect(err).To(MatchError(ContainSubstring("failed to write buildpack config:")))
- Expect(err).To(MatchError(ContainSubstring("Marshal can't handle func()(func)")))
- })
- })
- })
- })
-}
diff --git a/cargo/jam/internal/buildpack_inspector.go b/cargo/jam/internal/buildpack_inspector.go
deleted file mode 100644
index 4a15b6da..00000000
--- a/cargo/jam/internal/buildpack_inspector.go
+++ /dev/null
@@ -1,126 +0,0 @@
-package internal
-
-import (
- "archive/tar"
- "compress/gzip"
- "encoding/json"
- "fmt"
- "io"
- "os"
- "path/filepath"
- "strings"
-
- "github.com/paketo-buildpacks/packit/cargo"
-)
-
-type BuildpackInspector struct{}
-
-func NewBuildpackInspector() BuildpackInspector {
- return BuildpackInspector{}
-}
-
-func (i BuildpackInspector) Dependencies(path string) ([]cargo.Config, error) {
- file, err := os.Open(path)
- if err != nil {
- return nil, err
- }
- defer file.Close()
-
- indexJSON, err := fetchArchivedFile(tar.NewReader(file), "index.json")
- if err != nil {
- return nil, err
- }
-
- var index struct {
- Manifests []struct {
- Digest string `json:"digest"`
- } `json:"manifests"`
- }
-
- err = json.NewDecoder(indexJSON).Decode(&index)
- if err != nil {
- return nil, err
- }
-
- _, err = file.Seek(0, 0)
- if err != nil {
- return nil, err
- }
-
- manifest, err := fetchArchivedFile(tar.NewReader(file), filepath.Join("blobs", "sha256", strings.TrimPrefix(index.Manifests[0].Digest, "sha256:")))
- if err != nil {
- return nil, err
- }
-
- buildpackageDigest := index.Manifests[0].Digest
-
- var m struct {
- Layers []struct {
- Digest string `json:"digest"`
- } `json:"layers"`
- }
-
- err = json.NewDecoder(manifest).Decode(&m)
- if err != nil {
- return nil, err
- }
-
- var configs []cargo.Config
- for _, layer := range m.Layers {
- _, err = file.Seek(0, 0)
- if err != nil {
- return nil, err
- }
-
- buildpack, err := fetchArchivedFile(tar.NewReader(file), filepath.Join("blobs", "sha256", strings.TrimPrefix(layer.Digest, "sha256:")))
- if err != nil {
- return nil, err
- }
-
- buildpackGR, err := gzip.NewReader(buildpack)
- if err != nil {
- return nil, fmt.Errorf("failed to read buildpack gzip: %w", err)
- }
- defer buildpackGR.Close()
-
- buildpackTOML, err := fetchArchivedFile(tar.NewReader(buildpackGR), "buildpack.toml")
- if err != nil {
- return nil, err
- }
-
- var config cargo.Config
- err = cargo.DecodeConfig(buildpackTOML, &config)
- if err != nil {
- return nil, err
- }
-
- if len(config.Order) > 0 {
- config.Buildpack.SHA256 = buildpackageDigest
- }
- configs = append(configs, config)
- }
-
- if len(configs) == 1 {
- configs[0].Buildpack.SHA256 = buildpackageDigest
- }
-
- return configs, nil
-}
-
-func fetchArchivedFile(tr *tar.Reader, filename string) (io.Reader, error) {
- for {
- hdr, err := tr.Next()
- if err == io.EOF {
- break
- }
- if err != nil {
- return nil, err
- }
-
- if strings.HasSuffix(hdr.Name, filename) {
- return tr, nil
- }
- }
-
- return nil, fmt.Errorf("failed to fetch archived file %s", filename)
-}
diff --git a/cargo/jam/internal/buildpack_inspector_test.go b/cargo/jam/internal/buildpack_inspector_test.go
deleted file mode 100644
index 101cd9ab..00000000
--- a/cargo/jam/internal/buildpack_inspector_test.go
+++ /dev/null
@@ -1,711 +0,0 @@
-package internal_test
-
-import (
- "archive/tar"
- "bytes"
- "compress/gzip"
- "encoding/json"
- "os"
- "testing"
-
- "github.com/paketo-buildpacks/packit/cargo"
- "github.com/paketo-buildpacks/packit/cargo/jam/internal"
- "github.com/sclevine/spec"
-
- . "github.com/onsi/gomega"
-)
-
-func testBuildpackInspector(t *testing.T, context spec.G, it spec.S) {
- var (
- Expect = NewWithT(t).Expect
-
- buildpackage string
- inspector internal.BuildpackInspector
- )
-
- it.Before(func() {
- file, err := os.CreateTemp("", "buildpackage")
- Expect(err).NotTo(HaveOccurred())
-
- tw := tar.NewWriter(file)
-
- firstBuildpack := bytes.NewBuffer(nil)
- firstBuildpackGW := gzip.NewWriter(firstBuildpack)
- firstBuildpackTW := tar.NewWriter(firstBuildpackGW)
-
- content := []byte(`[buildpack]
-id = "some-buildpack"
-version = "1.2.3"
-
-[metadata.default-versions]
-some-dependency = "1.2.x"
-other-dependency = "2.3.x"
-
-[[metadata.dependencies]]
- id = "some-dependency"
- stacks = ["some-stack"]
- version = "1.2.3"
-
-[[metadata.dependencies]]
- id = "other-dependency"
- stacks = ["other-stack"]
- version = "2.3.4"
-
-[[stacks]]
- id = "some-stack"
-
-[[stacks]]
- id = "other-stack"
-`)
-
- err = firstBuildpackTW.WriteHeader(&tar.Header{
- Name: "./buildpack.toml",
- Mode: 0644,
- Size: int64(len(content)),
- })
- Expect(err).NotTo(HaveOccurred())
-
- _, err = firstBuildpackTW.Write(content)
- Expect(err).NotTo(HaveOccurred())
-
- Expect(firstBuildpackTW.Close()).To(Succeed())
- Expect(firstBuildpackGW.Close()).To(Succeed())
-
- err = tw.WriteHeader(&tar.Header{
- Name: "blobs/sha256/first-buildpack-sha",
- Mode: 0644,
- Size: int64(firstBuildpack.Len()),
- })
- Expect(err).NotTo(HaveOccurred())
-
- _, err = tw.Write(firstBuildpack.Bytes())
- Expect(err).NotTo(HaveOccurred())
-
- secondBuildpack := bytes.NewBuffer(nil)
- secondBuildpackGW := gzip.NewWriter(secondBuildpack)
- secondBuildpackTW := tar.NewWriter(secondBuildpackGW)
-
- content = []byte(`[buildpack]
-id = "other-buildpack"
-version = "2.3.4"
-
-[metadata.default-versions]
-first-dependency = "4.5.x"
-second-dependency = "5.6.x"
-
-[[metadata.dependencies]]
- id = "first-dependency"
- stacks = ["first-stack"]
- version = "4.5.6"
-
-[[metadata.dependencies]]
- id = "second-dependency"
- stacks = ["second-stack"]
- version = "5.6.7"
-
-[[stacks]]
- id = "first-stack"
-
-[[stacks]]
- id = "second-stack"
-`)
-
- err = secondBuildpackTW.WriteHeader(&tar.Header{
- Name: "./buildpack.toml",
- Mode: 0644,
- Size: int64(len(content)),
- })
- Expect(err).NotTo(HaveOccurred())
-
- _, err = secondBuildpackTW.Write(content)
- Expect(err).NotTo(HaveOccurred())
-
- Expect(secondBuildpackTW.Close()).To(Succeed())
- Expect(secondBuildpackGW.Close()).To(Succeed())
-
- err = tw.WriteHeader(&tar.Header{
- Name: "blobs/sha256/second-buildpack-sha",
- Mode: 0644,
- Size: int64(secondBuildpack.Len()),
- })
- Expect(err).NotTo(HaveOccurred())
-
- _, err = tw.Write(secondBuildpack.Bytes())
- Expect(err).NotTo(HaveOccurred())
-
- thirdBuildpack := bytes.NewBuffer(nil)
- thirdBuildpackGW := gzip.NewWriter(thirdBuildpack)
- thirdBuildpackTW := tar.NewWriter(thirdBuildpackGW)
-
- content = []byte(`[buildpack]
-id = "meta-buildpack"
-version = "3.4.5"
-
-[[order]]
-[[order.group]]
-id = "some-buildpack"
-version = "1.2.3"
-
-[[order]]
-[[order.group]]
-id = "other-buildpack"
-version = "2.3.4"
-`)
-
- err = thirdBuildpackTW.WriteHeader(&tar.Header{
- Name: "./buildpack.toml",
- Mode: 0644,
- Size: int64(len(content)),
- })
- Expect(err).NotTo(HaveOccurred())
-
- _, err = thirdBuildpackTW.Write(content)
- Expect(err).NotTo(HaveOccurred())
-
- Expect(thirdBuildpackTW.Close()).To(Succeed())
- Expect(thirdBuildpackGW.Close()).To(Succeed())
-
- err = tw.WriteHeader(&tar.Header{
- Name: "blobs/sha256/third-buildpack-sha",
- Mode: 0644,
- Size: int64(thirdBuildpack.Len()),
- })
- Expect(err).NotTo(HaveOccurred())
-
- _, err = tw.Write(thirdBuildpack.Bytes())
- Expect(err).NotTo(HaveOccurred())
-
- manifest := bytes.NewBuffer(nil)
- err = json.NewEncoder(manifest).Encode(map[string]interface{}{
- "layers": []map[string]interface{}{
- {"digest": "sha256:first-buildpack-sha"},
- {"digest": "sha256:second-buildpack-sha"},
- {"digest": "sha256:third-buildpack-sha"},
- },
- })
- Expect(err).NotTo(HaveOccurred())
-
- err = tw.WriteHeader(&tar.Header{
- Name: "blobs/sha256/manifest-sha",
- Mode: 0644,
- Size: int64(manifest.Len()),
- })
- Expect(err).NotTo(HaveOccurred())
-
- _, err = tw.Write(manifest.Bytes())
- Expect(err).NotTo(HaveOccurred())
-
- index := bytes.NewBuffer(nil)
- err = json.NewEncoder(index).Encode(map[string]interface{}{
- "manifests": []map[string]interface{}{
- {"digest": "sha256:manifest-sha"},
- },
- })
- Expect(err).NotTo(HaveOccurred())
-
- err = tw.WriteHeader(&tar.Header{
- Name: "index.json",
- Mode: 0644,
- Size: int64(index.Len()),
- })
- Expect(err).NotTo(HaveOccurred())
-
- _, err = tw.Write(index.Bytes())
- Expect(err).NotTo(HaveOccurred())
-
- buildpackage = file.Name()
-
- Expect(tw.Close()).To(Succeed())
- Expect(file.Close()).To(Succeed())
-
- inspector = internal.NewBuildpackInspector()
- })
-
- it.After(func() {
- Expect(os.Remove(buildpackage)).To(Succeed())
- })
-
- context("Dependencies", func() {
- it("returns a list of dependencies", func() {
- configs, err := inspector.Dependencies(buildpackage)
- Expect(err).NotTo(HaveOccurred())
- Expect(configs).To(Equal([]cargo.Config{
- {
- Buildpack: cargo.ConfigBuildpack{
- ID: "some-buildpack",
- Version: "1.2.3",
- },
- Metadata: cargo.ConfigMetadata{
- Dependencies: []cargo.ConfigMetadataDependency{
- {
- ID: "some-dependency",
- Stacks: []string{"some-stack"},
- Version: "1.2.3",
- },
- {
- ID: "other-dependency",
- Stacks: []string{"other-stack"},
- Version: "2.3.4",
- },
- },
- DefaultVersions: map[string]string{
- "some-dependency": "1.2.x",
- "other-dependency": "2.3.x",
- },
- },
- Stacks: []cargo.ConfigStack{
- {ID: "some-stack"},
- {ID: "other-stack"},
- },
- },
- {
- Buildpack: cargo.ConfigBuildpack{
- ID: "other-buildpack",
- Version: "2.3.4",
- },
- Metadata: cargo.ConfigMetadata{
- Dependencies: []cargo.ConfigMetadataDependency{
- {
- ID: "first-dependency",
- Stacks: []string{"first-stack"},
- Version: "4.5.6",
- },
- {
- ID: "second-dependency",
- Stacks: []string{"second-stack"},
- Version: "5.6.7",
- },
- },
- DefaultVersions: map[string]string{
- "first-dependency": "4.5.x",
- "second-dependency": "5.6.x",
- },
- },
- Stacks: []cargo.ConfigStack{
- {ID: "first-stack"},
- {ID: "second-stack"},
- },
- },
- {
- Buildpack: cargo.ConfigBuildpack{
- ID: "meta-buildpack",
- Version: "3.4.5",
- SHA256: "sha256:manifest-sha",
- },
- Order: []cargo.ConfigOrder{
- {
- Group: []cargo.ConfigOrderGroup{
- {
- ID: "some-buildpack",
- Version: "1.2.3",
- },
- },
- },
- {
- Group: []cargo.ConfigOrderGroup{
- {
- ID: "other-buildpack",
- Version: "2.3.4",
- },
- },
- },
- },
- },
- }))
- })
-
- context("failure cases", func() {
- context("when the file cannot be opened", func() {
- it("returns an error", func() {
- _, err := inspector.Dependencies("no-real-file")
- Expect(err).To(MatchError(ContainSubstring("no such file or directory")))
- })
- })
-
- context("when the index.json does not exist", func() {
- it.Before(func() {
- err := os.Truncate(buildpackage, 0)
- Expect(err).NotTo(HaveOccurred())
- })
-
- it("returns an error", func() {
- _, err := inspector.Dependencies(buildpackage)
- Expect(err).To(MatchError("failed to fetch archived file index.json"))
- })
- })
-
- context("when the index.json is malformed", func() {
- it.Before(func() {
- file, err := os.OpenFile(buildpackage, os.O_TRUNC|os.O_RDWR, 0644)
- Expect(err).NotTo(HaveOccurred())
-
- tw := tar.NewWriter(file)
-
- err = tw.WriteHeader(&tar.Header{
- Name: "index.json",
- Mode: 0644,
- Size: 3,
- })
- Expect(err).NotTo(HaveOccurred())
-
- _, err = tw.Write([]byte(`%%%`))
- Expect(err).NotTo(HaveOccurred())
-
- Expect(tw.Close()).To(Succeed())
- Expect(file.Close()).To(Succeed())
- })
-
- it("returns an error", func() {
- _, err := inspector.Dependencies(buildpackage)
- Expect(err).To(MatchError(ContainSubstring("invalid character '%'")))
- })
- })
-
- context("when the manifest does not exist", func() {
- it.Before(func() {
- file, err := os.OpenFile(buildpackage, os.O_TRUNC|os.O_RDWR, 0644)
- Expect(err).NotTo(HaveOccurred())
-
- tw := tar.NewWriter(file)
-
- index := bytes.NewBuffer(nil)
- err = json.NewEncoder(index).Encode(map[string]interface{}{
- "manifests": []map[string]interface{}{
- {"digest": "sha256:manifest-sha"},
- },
- })
- Expect(err).NotTo(HaveOccurred())
-
- err = tw.WriteHeader(&tar.Header{
- Name: "index.json",
- Mode: 0644,
- Size: int64(index.Len()),
- })
- Expect(err).NotTo(HaveOccurred())
-
- _, err = tw.Write(index.Bytes())
- Expect(err).NotTo(HaveOccurred())
-
- Expect(tw.Close()).To(Succeed())
- Expect(file.Close()).To(Succeed())
- })
-
- it("returns an error", func() {
- _, err := inspector.Dependencies(buildpackage)
- Expect(err).To(MatchError("failed to fetch archived file blobs/sha256/manifest-sha"))
- })
- })
-
- context("when the manifest is malformed", func() {
- it.Before(func() {
- file, err := os.OpenFile(buildpackage, os.O_TRUNC|os.O_RDWR, 0644)
- Expect(err).NotTo(HaveOccurred())
-
- tw := tar.NewWriter(file)
-
- err = tw.WriteHeader(&tar.Header{
- Name: "blobs/sha256/manifest-sha",
- Mode: 0644,
- Size: 3,
- })
- Expect(err).NotTo(HaveOccurred())
-
- _, err = tw.Write([]byte(`%%%`))
- Expect(err).NotTo(HaveOccurred())
-
- index := bytes.NewBuffer(nil)
- err = json.NewEncoder(index).Encode(map[string]interface{}{
- "manifests": []map[string]interface{}{
- {"digest": "sha256:manifest-sha"},
- },
- })
- Expect(err).NotTo(HaveOccurred())
-
- err = tw.WriteHeader(&tar.Header{
- Name: "index.json",
- Mode: 0644,
- Size: int64(index.Len()),
- })
- Expect(err).NotTo(HaveOccurred())
-
- _, err = tw.Write(index.Bytes())
- Expect(err).NotTo(HaveOccurred())
-
- Expect(tw.Close()).To(Succeed())
- Expect(file.Close()).To(Succeed())
- })
-
- it("returns an error", func() {
- _, err := inspector.Dependencies(buildpackage)
- Expect(err).To(MatchError(ContainSubstring("invalid character '%'")))
- })
- })
-
- context("when the buildpack blob does not exist", func() {
- it.Before(func() {
- file, err := os.OpenFile(buildpackage, os.O_TRUNC|os.O_RDWR, 0644)
- Expect(err).NotTo(HaveOccurred())
-
- tw := tar.NewWriter(file)
-
- manifest := bytes.NewBuffer(nil)
- err = json.NewEncoder(manifest).Encode(map[string]interface{}{
- "layers": []map[string]interface{}{
- {"digest": "sha256:buildpack-sha"},
- },
- })
- Expect(err).NotTo(HaveOccurred())
-
- err = tw.WriteHeader(&tar.Header{
- Name: "blobs/sha256/manifest-sha",
- Mode: 0644,
- Size: int64(manifest.Len()),
- })
- Expect(err).NotTo(HaveOccurred())
-
- _, err = tw.Write(manifest.Bytes())
- Expect(err).NotTo(HaveOccurred())
-
- index := bytes.NewBuffer(nil)
- err = json.NewEncoder(index).Encode(map[string]interface{}{
- "manifests": []map[string]interface{}{
- {"digest": "sha256:manifest-sha"},
- },
- })
- Expect(err).NotTo(HaveOccurred())
-
- err = tw.WriteHeader(&tar.Header{
- Name: "index.json",
- Mode: 0644,
- Size: int64(index.Len()),
- })
- Expect(err).NotTo(HaveOccurred())
-
- _, err = tw.Write(index.Bytes())
- Expect(err).NotTo(HaveOccurred())
-
- Expect(tw.Close()).To(Succeed())
- Expect(file.Close()).To(Succeed())
- })
-
- it("returns an error", func() {
- _, err := inspector.Dependencies(buildpackage)
- Expect(err).To(MatchError("failed to fetch archived file blobs/sha256/buildpack-sha"))
- })
- })
-
- context("when the buildpack blob is not a gziped tar", func() {
- it.Before(func() {
- file, err := os.OpenFile(buildpackage, os.O_TRUNC|os.O_RDWR, 0644)
- Expect(err).NotTo(HaveOccurred())
-
- tw := tar.NewWriter(file)
-
- err = tw.WriteHeader(&tar.Header{
- Name: "blobs/sha256/buildpack-sha",
- Mode: 0644,
- Size: 3,
- })
- Expect(err).NotTo(HaveOccurred())
-
- _, err = tw.Write([]byte(`%%%`))
- Expect(err).NotTo(HaveOccurred())
-
- manifest := bytes.NewBuffer(nil)
- err = json.NewEncoder(manifest).Encode(map[string]interface{}{
- "layers": []map[string]interface{}{
- {"digest": "sha256:buildpack-sha"},
- },
- })
- Expect(err).NotTo(HaveOccurred())
-
- err = tw.WriteHeader(&tar.Header{
- Name: "blobs/sha256/manifest-sha",
- Mode: 0644,
- Size: int64(manifest.Len()),
- })
- Expect(err).NotTo(HaveOccurred())
-
- _, err = tw.Write(manifest.Bytes())
- Expect(err).NotTo(HaveOccurred())
-
- index := bytes.NewBuffer(nil)
- err = json.NewEncoder(index).Encode(map[string]interface{}{
- "manifests": []map[string]interface{}{
- {"digest": "sha256:manifest-sha"},
- },
- })
- Expect(err).NotTo(HaveOccurred())
-
- err = tw.WriteHeader(&tar.Header{
- Name: "index.json",
- Mode: 0644,
- Size: int64(index.Len()),
- })
- Expect(err).NotTo(HaveOccurred())
-
- _, err = tw.Write(index.Bytes())
- Expect(err).NotTo(HaveOccurred())
-
- Expect(tw.Close()).To(Succeed())
- Expect(file.Close()).To(Succeed())
- })
-
- it("returns an error", func() {
- _, err := inspector.Dependencies(buildpackage)
- Expect(err).To(MatchError("failed to read buildpack gzip: unexpected EOF"))
- })
- })
-
- context("when the buildpack blob does not contain a buildpack.toml", func() {
- it.Before(func() {
- file, err := os.OpenFile(buildpackage, os.O_TRUNC|os.O_RDWR, 0644)
- Expect(err).NotTo(HaveOccurred())
-
- tw := tar.NewWriter(file)
-
- buildpack := bytes.NewBuffer(nil)
- buildpackGW := gzip.NewWriter(buildpack)
- buildpackTW := tar.NewWriter(buildpackGW)
-
- Expect(buildpackTW.Close()).To(Succeed())
- Expect(buildpackGW.Close()).To(Succeed())
-
- err = tw.WriteHeader(&tar.Header{
- Name: "blobs/sha256/buildpack-sha",
- Mode: 0644,
- Size: int64(buildpack.Len()),
- })
- Expect(err).NotTo(HaveOccurred())
-
- _, err = tw.Write(buildpack.Bytes())
- Expect(err).NotTo(HaveOccurred())
-
- manifest := bytes.NewBuffer(nil)
- err = json.NewEncoder(manifest).Encode(map[string]interface{}{
- "layers": []map[string]interface{}{
- {"digest": "sha256:buildpack-sha"},
- },
- })
- Expect(err).NotTo(HaveOccurred())
-
- err = tw.WriteHeader(&tar.Header{
- Name: "blobs/sha256/manifest-sha",
- Mode: 0644,
- Size: int64(manifest.Len()),
- })
- Expect(err).NotTo(HaveOccurred())
-
- _, err = tw.Write(manifest.Bytes())
- Expect(err).NotTo(HaveOccurred())
-
- index := bytes.NewBuffer(nil)
- err = json.NewEncoder(index).Encode(map[string]interface{}{
- "manifests": []map[string]interface{}{
- {"digest": "sha256:manifest-sha"},
- },
- })
- Expect(err).NotTo(HaveOccurred())
-
- err = tw.WriteHeader(&tar.Header{
- Name: "index.json",
- Mode: 0644,
- Size: int64(index.Len()),
- })
- Expect(err).NotTo(HaveOccurred())
-
- _, err = tw.Write(index.Bytes())
- Expect(err).NotTo(HaveOccurred())
-
- Expect(tw.Close()).To(Succeed())
- Expect(file.Close()).To(Succeed())
- })
-
- it("returns an error", func() {
- _, err := inspector.Dependencies(buildpackage)
- Expect(err).To(MatchError("failed to fetch archived file buildpack.toml"))
- })
- })
-
- context("when the buildpack.toml is malformed", func() {
- it.Before(func() {
- file, err := os.OpenFile(buildpackage, os.O_TRUNC|os.O_RDWR, 0644)
- Expect(err).NotTo(HaveOccurred())
-
- tw := tar.NewWriter(file)
-
- buildpack := bytes.NewBuffer(nil)
- buildpackGW := gzip.NewWriter(buildpack)
- buildpackTW := tar.NewWriter(buildpackGW)
-
- err = buildpackTW.WriteHeader(&tar.Header{
- Name: "./buildpack.toml",
- Mode: 0644,
- Size: 3,
- })
- Expect(err).NotTo(HaveOccurred())
-
- _, err = buildpackTW.Write([]byte(`%%%`))
- Expect(err).NotTo(HaveOccurred())
-
- Expect(buildpackTW.Close()).To(Succeed())
- Expect(buildpackGW.Close()).To(Succeed())
-
- err = tw.WriteHeader(&tar.Header{
- Name: "blobs/sha256/buildpack-sha",
- Mode: 0644,
- Size: int64(buildpack.Len()),
- })
- Expect(err).NotTo(HaveOccurred())
-
- _, err = tw.Write(buildpack.Bytes())
- Expect(err).NotTo(HaveOccurred())
-
- manifest := bytes.NewBuffer(nil)
- err = json.NewEncoder(manifest).Encode(map[string]interface{}{
- "layers": []map[string]interface{}{
- {"digest": "sha256:buildpack-sha"},
- },
- })
- Expect(err).NotTo(HaveOccurred())
-
- err = tw.WriteHeader(&tar.Header{
- Name: "blobs/sha256/manifest-sha",
- Mode: 0644,
- Size: int64(manifest.Len()),
- })
- Expect(err).NotTo(HaveOccurred())
-
- _, err = tw.Write(manifest.Bytes())
- Expect(err).NotTo(HaveOccurred())
-
- index := bytes.NewBuffer(nil)
- err = json.NewEncoder(index).Encode(map[string]interface{}{
- "manifests": []map[string]interface{}{
- {"digest": "sha256:manifest-sha"},
- },
- })
- Expect(err).NotTo(HaveOccurred())
-
- err = tw.WriteHeader(&tar.Header{
- Name: "index.json",
- Mode: 0644,
- Size: int64(index.Len()),
- })
- Expect(err).NotTo(HaveOccurred())
-
- _, err = tw.Write(index.Bytes())
- Expect(err).NotTo(HaveOccurred())
-
- Expect(tw.Close()).To(Succeed())
- Expect(file.Close()).To(Succeed())
- })
-
- it("returns an error", func() {
- _, err := inspector.Dependencies(buildpackage)
- Expect(err).To(MatchError(ContainSubstring("expected '.' or '=', but got '%' instead")))
- })
- })
- })
- })
-}
diff --git a/cargo/jam/internal/dependency.go b/cargo/jam/internal/dependency.go
deleted file mode 100644
index 6c215cca..00000000
--- a/cargo/jam/internal/dependency.go
+++ /dev/null
@@ -1,146 +0,0 @@
-package internal
-
-import (
- "encoding/json"
- "fmt"
- "io"
- "net/http"
- "sort"
- "strings"
- "time"
-
- "github.com/Masterminds/semver/v3"
- "github.com/paketo-buildpacks/packit/cargo"
-)
-
-// Dependency represents the structure of a single entry in the dep-server
-type Dependency struct {
- DeprecationDate string `json:"deprecation_date,omitempty"`
- // The ID field should be the `name` from the dep-server
- ID string `json:"name,omitempty"`
- SHA256 string `json:"sha256,omitempty"`
- Source string `json:"source,omitempty"`
- SourceSHA256 string `json:"source_sha256,omitempty"`
- Stacks []Stack `json:"stacks,omitempty"`
- URI string `json:"uri,omitempty"`
- Version string `json:"version,omitempty"`
- CreatedAt string `json:"created_at,omitempty"`
- ModifedAt string `json:"modified_at,omitempty"`
- CPE string `json:"cpe,omitempty"`
- PURL string `json:"purl,omitempty"`
- Licenses []string `json:"licenses,omitempty"`
-}
-
-type Stack struct {
- ID string `json:"id,omitempty"`
-}
-
-// GetDependenciesWithinConstraint reaches out to the given API to search for all
-// dependencies that match the ID and version constraint of a cargo
-// DependencyConstraint. It returns a filtered list of dependencies that match the
-// constraint and ID, in order of lowest version to highest.
-
-func GetDependenciesWithinConstraint(dependencies []Dependency, constraint cargo.ConfigMetadataDependencyConstraint, dependencyName string) ([]cargo.ConfigMetadataDependency, error) {
- var matchingDependencies []cargo.ConfigMetadataDependency
-
- for _, dependency := range dependencies {
- c, err := semver.NewConstraint(constraint.Constraint)
- if err != nil {
- return nil, err
- }
-
- depVersion, err := semver.NewVersion(dependency.Version)
- if err != nil {
- return nil, err
- }
-
- if !c.Check(depVersion) || dependency.ID != constraint.ID {
- continue
- }
-
- matchingDependencies = append(matchingDependencies, convertToCargoDependency(dependency, dependencyName))
- }
-
- sort.Slice(matchingDependencies, func(i, j int) bool {
- iVersion := semver.MustParse(matchingDependencies[i].Version)
- jVersion := semver.MustParse(matchingDependencies[j].Version)
- return iVersion.LessThan(jVersion)
- })
-
- // if there are more requested patches than matching dependencies, just
- // return all matching dependencies.
- if constraint.Patches > len(matchingDependencies) {
- return matchingDependencies, nil
- }
-
- // Buildpack.toml dependencies are usually in order from lowest to highest
- // version. We want to return the the n largest matching dependencies in the
- // same order, n being the constraint.Patches field from the buildpack.toml.
- // Here, we are returning the n highest matching Dependencies.
- return matchingDependencies[len(matchingDependencies)-int(constraint.Patches):], nil
-}
-
-// GetDependencies returns all dependencies from a given API endpoint
-func GetAllDependencies(api, dependencyID string) ([]Dependency, error) {
- url := fmt.Sprintf("%s/v1/dependency?name=%s", api, dependencyID)
- resp, err := http.Get(url)
- if err != nil {
- return nil, fmt.Errorf("failed to query url %s: %w", url, err)
- }
- if resp.StatusCode != http.StatusOK {
- return nil, fmt.Errorf("failed to query url %s with: status code %d", url, resp.StatusCode)
- }
-
- defer resp.Body.Close()
- b, err := io.ReadAll(resp.Body)
- if err != nil {
- return nil, fmt.Errorf("failed to read response body: %w", err)
- }
- var dependencies []Dependency
- err = json.Unmarshal(b, &dependencies)
- if err != nil {
- return nil, fmt.Errorf("failed to unmarshal: %w", err)
- }
-
- return dependencies, nil
-}
-
-// FindDependencyName returns the name of a Dependency in a cargo.Config that
-// has a matching ID with a given dependency ID.
-func FindDependencyName(dependencyID string, config cargo.Config) string {
- name := ""
- for _, dependency := range config.Metadata.Dependencies {
- if dependency.ID == dependencyID {
- name = dependency.Name
- continue
- }
- }
- return name
-}
-
-// convertDependency converts an internal.Dependency type into a
-// cargo.ConfigMetadataDependency type. It takes in a dependency name as well
-// since this isn't a field on the internal.Dependency.
-func convertToCargoDependency(dependency Dependency, dependencyName string) cargo.ConfigMetadataDependency {
- var cargoDependency cargo.ConfigMetadataDependency
-
- if dependency.DeprecationDate != "" {
- deprecationDate, _ := time.Parse(time.RFC3339, dependency.DeprecationDate)
- cargoDependency.DeprecationDate = &deprecationDate
- }
-
- cargoDependency.CPE = dependency.CPE
- cargoDependency.PURL = dependency.PURL
- cargoDependency.ID = dependency.ID
- cargoDependency.Name = dependencyName
- cargoDependency.SHA256 = dependency.SHA256
- cargoDependency.Source = dependency.Source
- cargoDependency.SourceSHA256 = dependency.SourceSHA256
- cargoDependency.URI = dependency.URI
- cargoDependency.Version = strings.Replace(dependency.Version, "v", "", -1)
- for _, stack := range dependency.Stacks {
- cargoDependency.Stacks = append(cargoDependency.Stacks, stack.ID)
- }
- cargoDependency.Licenses = append(cargoDependency.Licenses, dependency.Licenses...)
- return cargoDependency
-}
diff --git a/cargo/jam/internal/dependency_cacher.go b/cargo/jam/internal/dependency_cacher.go
deleted file mode 100644
index 6e967b98..00000000
--- a/cargo/jam/internal/dependency_cacher.go
+++ /dev/null
@@ -1,78 +0,0 @@
-package internal
-
-import (
- "fmt"
- "io"
- "os"
- "path/filepath"
- "strings"
-
- "github.com/paketo-buildpacks/packit/cargo"
- "github.com/paketo-buildpacks/packit/scribe"
-)
-
-//go:generate faux --interface Downloader --output fakes/downloader.go
-type Downloader interface {
- Drop(root, uri string) (io.ReadCloser, error)
-}
-
-type DependencyCacher struct {
- downloader Downloader
- logger scribe.Logger
-}
-
-func NewDependencyCacher(downloader Downloader, logger scribe.Logger) DependencyCacher {
- return DependencyCacher{
- downloader: downloader,
- logger: logger,
- }
-}
-
-func (dc DependencyCacher) Cache(root string, deps []cargo.ConfigMetadataDependency) ([]cargo.ConfigMetadataDependency, error) {
- dc.logger.Process("Downloading dependencies...")
- dir := filepath.Join(root, "dependencies")
- err := os.MkdirAll(dir, os.ModePerm)
- if err != nil {
- return nil, fmt.Errorf("failed to create dependencies directory: %s", err)
- }
-
- var dependencies []cargo.ConfigMetadataDependency
- for _, dep := range deps {
- dc.logger.Subprocess("%s (%s) [%s]", dep.ID, dep.Version, strings.Join(dep.Stacks, ", "))
- dc.logger.Action("↳ dependencies/%s", dep.SHA256)
-
- source, err := dc.downloader.Drop("", dep.URI)
- if err != nil {
- return nil, fmt.Errorf("failed to download dependency: %s", err)
- }
-
- validatedSource := cargo.NewValidatedReader(source, dep.SHA256)
-
- destination, err := os.Create(filepath.Join(dir, dep.SHA256))
- if err != nil {
- return nil, fmt.Errorf("failed to create destination file: %s", err)
- }
-
- _, err = io.Copy(destination, validatedSource)
- if err != nil {
- return nil, fmt.Errorf("failed to copy dependency: %s", err)
- }
-
- err = destination.Close()
- if err != nil {
- return nil, fmt.Errorf("failed to close dependency destination: %s", err)
- }
-
- err = source.Close()
- if err != nil {
- return nil, fmt.Errorf("failed to close dependency source: %s", err)
- }
-
- dep.URI = fmt.Sprintf("file:///dependencies/%s", dep.SHA256)
- dependencies = append(dependencies, dep)
- }
-
- dc.logger.Break()
-
- return dependencies, nil
-}
diff --git a/cargo/jam/internal/dependency_cacher_test.go b/cargo/jam/internal/dependency_cacher_test.go
deleted file mode 100644
index f034d234..00000000
--- a/cargo/jam/internal/dependency_cacher_test.go
+++ /dev/null
@@ -1,189 +0,0 @@
-package internal_test
-
-import (
- "bytes"
- "fmt"
- "io"
- "os"
- "path/filepath"
- "strings"
- "testing"
-
- "github.com/paketo-buildpacks/packit/cargo"
- "github.com/paketo-buildpacks/packit/cargo/jam/internal"
- "github.com/paketo-buildpacks/packit/cargo/jam/internal/fakes"
- "github.com/paketo-buildpacks/packit/scribe"
- "github.com/sclevine/spec"
-
- . "github.com/onsi/gomega"
-)
-
-func testDependencyCacher(t *testing.T, context spec.G, it spec.S) {
- var (
- Expect = NewWithT(t).Expect
-
- tmpDir string
- downloader *fakes.Downloader
- cacher internal.DependencyCacher
- output *bytes.Buffer
- )
-
- it.Before(func() {
- var err error
- tmpDir, err = os.MkdirTemp("", "cacher-test")
- Expect(err).NotTo(HaveOccurred())
-
- downloader = &fakes.Downloader{}
- downloader.DropCall.Stub = func(root, uri string) (io.ReadCloser, error) {
- switch uri {
- case "http://dep1-uri":
- return io.NopCloser(strings.NewReader("dep1-contents")), nil
-
- case "http://dep2-uri":
- return io.NopCloser(strings.NewReader("dep2-contents")), nil
-
- case "http://error-dep":
- return io.NopCloser(errorReader{}), nil
-
- default:
- return nil, fmt.Errorf("no such dependency: %s", uri)
- }
- }
-
- output = bytes.NewBuffer(nil)
- cacher = internal.NewDependencyCacher(downloader, scribe.NewLogger(output))
- })
-
- it.After(func() {
- Expect(os.RemoveAll(tmpDir)).To(Succeed())
- })
-
- context("Cache", func() {
- it("caches dependencies and returns updated dependencies list", func() {
- deps, err := cacher.Cache(tmpDir, []cargo.ConfigMetadataDependency{
- {
- ID: "dep-1",
- Version: "1.2.3",
- Stacks: []string{"some-stack"},
- URI: "http://dep1-uri",
- SHA256: "3c9de6683673f3e8039599d5200d533807c6c35fd9e35d6b6d77009122868f0f",
- },
- {
- ID: "dep-2",
- Version: "4.5.6",
- Stacks: []string{"some-stack", "some-other-stack"},
- URI: "http://dep2-uri",
- SHA256: "bfc72d62682f4a2edc3218d70b1f7052e4f336c179a8f19ef12ee721d4ea29b7",
- },
- })
- Expect(err).NotTo(HaveOccurred())
- Expect(deps).To(Equal([]cargo.ConfigMetadataDependency{
- {
- ID: "dep-1",
- Version: "1.2.3",
- Stacks: []string{"some-stack"},
- URI: "file:///dependencies/3c9de6683673f3e8039599d5200d533807c6c35fd9e35d6b6d77009122868f0f",
- SHA256: "3c9de6683673f3e8039599d5200d533807c6c35fd9e35d6b6d77009122868f0f",
- },
- {
- ID: "dep-2",
- Version: "4.5.6",
- Stacks: []string{"some-stack", "some-other-stack"},
- URI: "file:///dependencies/bfc72d62682f4a2edc3218d70b1f7052e4f336c179a8f19ef12ee721d4ea29b7",
- SHA256: "bfc72d62682f4a2edc3218d70b1f7052e4f336c179a8f19ef12ee721d4ea29b7",
- },
- }))
-
- Expect(downloader.DropCall.Receives.Root).To(Equal(""))
-
- contents, err := os.ReadFile(filepath.Join(tmpDir, "dependencies", "3c9de6683673f3e8039599d5200d533807c6c35fd9e35d6b6d77009122868f0f"))
- Expect(err).NotTo(HaveOccurred())
- Expect(string(contents)).To(Equal("dep1-contents"))
-
- contents, err = os.ReadFile(filepath.Join(tmpDir, "dependencies", "bfc72d62682f4a2edc3218d70b1f7052e4f336c179a8f19ef12ee721d4ea29b7"))
- Expect(err).NotTo(HaveOccurred())
- Expect(string(contents)).To(Equal("dep2-contents"))
-
- Expect(output.String()).To(ContainSubstring(" Downloading dependencies..."))
- Expect(output.String()).To(ContainSubstring(" dep-1 (1.2.3) [some-stack]"))
- Expect(output.String()).To(ContainSubstring(" ↳ dependencies/3c9de6683673f3e8039599d5200d533807c6c35fd9e35d6b6d77009122868f0f"))
- Expect(output.String()).To(ContainSubstring(" dep-2 (4.5.6) [some-stack, some-other-stack]"))
- Expect(output.String()).To(ContainSubstring(" ↳ dependencies/bfc72d62682f4a2edc3218d70b1f7052e4f336c179a8f19ef12ee721d4ea29b7"))
-
- })
-
- context("failure cases", func() {
- context("when the dependencies directory cannot be created", func() {
- it.Before(func() {
- Expect(os.Chmod(tmpDir, 0000)).To(Succeed())
- })
-
- it.After(func() {
- Expect(os.Chmod(tmpDir, os.ModePerm)).To(Succeed())
- })
-
- it("returns an error", func() {
- _, err := cacher.Cache(tmpDir, nil)
- Expect(err).To(MatchError(ContainSubstring("failed to create dependencies directory:")))
- Expect(err).To(MatchError(ContainSubstring("permission denied")))
- })
- })
-
- context("when a dependency cannot be downloaded", func() {
- it("returns an error", func() {
- _, err := cacher.Cache(tmpDir, []cargo.ConfigMetadataDependency{
- {
- URI: "http://unknown-dep",
- },
- })
- Expect(err).To(MatchError("failed to download dependency: no such dependency: http://unknown-dep"))
- })
- })
-
- context("when the destination file cannot be created", func() {
- it.Before(func() {
- Expect(os.MkdirAll(filepath.Join(tmpDir, "dependencies"), 0000)).To(Succeed())
- })
-
- it.Before(func() {
- Expect(os.MkdirAll(filepath.Join(tmpDir, "dependencies"), os.ModePerm)).To(Succeed())
- })
-
- it("returns an error", func() {
- _, err := cacher.Cache(tmpDir, []cargo.ConfigMetadataDependency{
- {
- URI: "http://dep1-uri",
- SHA256: "3c9de6683673f3e8039599d5200d533807c6c35fd9e35d6b6d77009122868f0f",
- },
- })
- Expect(err).To(MatchError(ContainSubstring("failed to create destination file:")))
- Expect(err).To(MatchError(ContainSubstring("permission denied")))
- })
- })
-
- context("when we fail to read the downloaded file", func() {
- it("returns an error", func() {
- _, err := cacher.Cache(tmpDir, []cargo.ConfigMetadataDependency{
- {
- URI: "http://error-dep",
- SHA256: "some-sha",
- },
- })
- Expect(err).To(MatchError("failed to copy dependency: failed to read"))
- })
- })
-
- context("when the checksum does not match", func() {
- it("returns an error", func() {
- _, err := cacher.Cache(tmpDir, []cargo.ConfigMetadataDependency{
- {
- URI: "http://dep1-uri",
- SHA256: "invalid-sha",
- },
- })
- Expect(err).To(MatchError("failed to copy dependency: validation error: checksum does not match"))
- })
- })
- })
- })
-}
diff --git a/cargo/jam/internal/dependency_test.go b/cargo/jam/internal/dependency_test.go
deleted file mode 100644
index f72f7641..00000000
--- a/cargo/jam/internal/dependency_test.go
+++ /dev/null
@@ -1,441 +0,0 @@
-package internal_test
-
-import (
- "fmt"
- "net/http"
- "net/http/httptest"
- "testing"
-
- "github.com/paketo-buildpacks/packit/cargo"
- "github.com/paketo-buildpacks/packit/cargo/jam/internal"
- "github.com/sclevine/spec"
-
- . "github.com/onsi/gomega"
-)
-
-func testDependency(t *testing.T, context spec.G, it spec.S) {
- var (
- withT = NewWithT(t)
- Expect = withT.Expect
- allDependencies []internal.Dependency
- )
-
- it.Before(func() {
- allDependencies = []internal.Dependency{
- {
- DeprecationDate: "",
- ID: "some-dep",
- SHA256: "some-sha",
- Source: "some-source",
- SourceSHA256: "some-source-sha",
- Stacks: []internal.Stack{
- {
- ID: "some-stack",
- },
- },
- URI: "some-dep-uri",
- Version: "v1.0.0",
- CreatedAt: "sometime",
- ModifedAt: "another-time",
- CPE: "cpe-notation",
- PURL: "some-purl",
- Licenses: []string{
- "fancy-license",
- "fancy-license-2",
- },
- },
- {
- DeprecationDate: "",
- ID: "some-dep",
- SHA256: "some-sha-two",
- Source: "some-source-two",
- SourceSHA256: "some-source-sha-two",
- Stacks: []internal.Stack{
- {
- ID: "some-stack-two",
- },
- },
- URI: "some-dep-uri-two",
- Version: "v1.1.2",
- CreatedAt: "sometime",
- ModifedAt: "another-time",
- CPE: "cpe-notation",
- PURL: "some-purl",
- Licenses: []string{
- "fancy-license",
- "fancy-license-2",
- },
- },
- {
- DeprecationDate: "",
- ID: "some-dep",
- SHA256: "some-sha-three",
- Source: "some-source-three",
- SourceSHA256: "some-source-sha-three",
- Stacks: []internal.Stack{
- {
- ID: "some-stack-three",
- },
- },
- URI: "some-dep-uri-three",
- Version: "v1.5.6",
- CreatedAt: "sometime",
- ModifedAt: "another-time",
- CPE: "cpe-notation",
- PURL: "some-purl",
- Licenses: []string{
- "fancy-license",
- "fancy-license-2",
- },
- },
- {
- DeprecationDate: "",
- ID: "some-dep",
- SHA256: "some-sha-four",
- Source: "some-source-four",
- SourceSHA256: "some-source-sha-four",
- Stacks: []internal.Stack{
- {
- ID: "some-stack-four",
- },
- },
- URI: "some-dep-uri-four",
- Version: "v2.3.2",
- CreatedAt: "sometime",
- ModifedAt: "another-time",
- CPE: "cpe-notation",
- PURL: "some-purl",
- Licenses: []string{
- "fancy-license",
- "fancy-license-2",
- },
- },
- {
- DeprecationDate: "",
- ID: "different-dep",
- SHA256: "different-dep-sha",
- Source: "different-dep-source",
- SourceSHA256: "different-dep-source-sha",
- Stacks: []internal.Stack{
- {
- ID: "different-dep-stack",
- },
- },
- URI: "different-dep-uri",
- Version: "v1.9.8",
- CreatedAt: "sometime",
- ModifedAt: "another-time",
- CPE: "cpe-notation",
- PURL: "some-purl",
- Licenses: []string{
- "fancy-license",
- "fancy-license-2",
- },
- },
- }
- })
-
- context("GetAllDependencies", func() {
- var server *httptest.Server
- it.Before(func() {
- server = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
- if req.Method == http.MethodHead {
- http.Error(w, "NotFound", http.StatusNotFound)
- return
- }
-
- switch req.URL.Path {
- case "/v1/":
- w.WriteHeader(http.StatusOK)
-
- case "/v1/dependency":
- if req.URL.RawQuery == "name=some-dep" {
- w.WriteHeader(http.StatusOK)
- fmt.Fprintln(w, `[
- {
- "name": "some-dep",
- "version": "v1.0.0",
- "sha256": "some-sha",
- "uri": "some-dep-uri",
- "stacks": [
- {
- "id": "some-stack"
- }
- ],
- "source": "some-source",
- "source_sha256": "some-source-sha",
- "created_at": "sometime",
- "modified_at": "another-time",
- "cpe": "cpe-notation",
- "purl": "some-purl",
- "deprecation_date": "",
- "licenses": ["fancy-license", "fancy-license-2"]
- },
- {
- "name": "some-dep",
- "version": "v1.1.2",
- "sha256": "some-sha-two",
- "uri": "some-dep-uri-two",
- "stacks": [
- {
- "id": "some-stack-two"
- }
- ],
- "source": "some-source-two",
- "source_sha256": "some-source-sha-two",
- "created_at": "sometime",
- "modified_at": "another-time",
- "cpe": "cpe-notation",
- "purl": "some-purl",
- "licenses": ["fancy-license", "fancy-license-2"]
- },
- {
- "name": "some-dep",
- "version": "v1.5.6",
- "sha256": "some-sha-three",
- "uri": "some-dep-uri-three",
- "stacks": [
- {
- "id": "some-stack-three"
- }
- ],
- "source": "some-source-three",
- "source_sha256": "some-source-sha-three",
- "created_at": "sometime",
- "modified_at": "another-time",
- "cpe": "cpe-notation",
- "purl": "some-purl",
- "licenses": ["fancy-license", "fancy-license-2"]
- },
- {
- "name": "some-dep",
- "version": "v2.3.2",
- "sha256": "some-sha-four",
- "uri": "some-dep-uri-four",
- "stacks": [
- {
- "id": "some-stack-four"
- }
- ],
- "source": "some-source-four",
- "source_sha256": "some-source-sha-four",
- "created_at": "sometime",
- "modified_at": "another-time",
- "cpe": "cpe-notation",
- "purl": "some-purl",
- "licenses": ["fancy-license", "fancy-license-2"]
- },
- {
- "name": "different-dep",
- "version": "v1.9.8",
- "sha256": "different-dep-sha",
- "uri": "different-dep-uri",
- "stacks": [
- {
- "id": "different-dep-stack"
- }
- ],
- "source": "different-dep-source",
- "source_sha256": "different-dep-source-sha",
- "created_at": "sometime",
- "modified_at": "another-time",
- "cpe": "cpe-notation",
- "purl": "some-purl",
- "licenses": ["fancy-license", "fancy-license-2"]
- }
-]`)
- }
- if req.URL.RawQuery == "name=bad-status" {
- w.WriteHeader(http.StatusBadRequest)
- }
-
- if req.URL.RawQuery == "name=bad-dep" {
- w.WriteHeader(http.StatusOK)
- filename := "other-payload"
- w.Header().Set("Content-Type", "application/json")
- w.Header().Set("Content-Disposition", fmt.Sprintf("attachment; filename=\"%s\"", filename))
- }
-
- default:
- t.Fatal(fmt.Sprintf("unknown path: %s", req.URL.Path))
- }
- }))
- })
-
- it.After(func() {
- server.Close()
- })
-
- context("given a valid API and dependencyID", func() {
- it("returns a slice of Dependency from the API server", func() {
- dependencies, err := internal.GetAllDependencies(server.URL, "some-dep")
- Expect(err).NotTo(HaveOccurred())
- Expect(dependencies).To(Equal(allDependencies))
- })
- })
-
- context("failure cases", func() {
- context("the url cannot be queried", func() {
- it("returns an error", func() {
- _, err := internal.GetAllDependencies("%%%", "some-dep")
- Expect(err).To(MatchError(ContainSubstring("failed to query url")))
- })
- })
-
- context("the API returns a non 200 status code", func() {
- it("returns an error", func() {
- _, err := internal.GetAllDependencies(server.URL, "bad-status")
- Expect(err).To(MatchError(ContainSubstring(fmt.Sprintf("failed to query url %s/v1/dependency?name=bad-status with: status code 400", server.URL))))
- })
- })
-
- context("the API response is not unmarshal-able", func() {
- it("returns an error", func() {
- _, err := internal.GetAllDependencies(server.URL, "bad-dep")
- Expect(err).To(MatchError(ContainSubstring("failed to unmarshal: unexpected end of JSON input")))
- })
- })
- })
- })
-
- context("GetDependenciesWithinConstraint", func() {
- context("given a valid api and constraint", func() {
- it("returns a sorted list of dependencies that match the constraint", func() {
- constraint := cargo.ConfigMetadataDependencyConstraint{
- Constraint: "1.*",
- ID: "some-dep",
- Patches: 3,
- }
-
- dependencies, err := internal.GetDependenciesWithinConstraint(allDependencies, constraint, "")
- Expect(err).NotTo(HaveOccurred())
- Expect(dependencies).To(Equal([]cargo.ConfigMetadataDependency{
- {
- CPE: "cpe-notation",
- PURL: "some-purl",
- ID: "some-dep",
- Licenses: []string{"fancy-license", "fancy-license-2"},
- Version: "1.0.0",
- Stacks: []string{"some-stack"},
- URI: "some-dep-uri",
- SHA256: "some-sha",
- Source: "some-source",
- SourceSHA256: "some-source-sha",
- },
- {
- CPE: "cpe-notation",
- PURL: "some-purl",
- ID: "some-dep",
- Licenses: []string{"fancy-license", "fancy-license-2"},
- Version: "1.1.2",
- Stacks: []string{"some-stack-two"},
- URI: "some-dep-uri-two",
- SHA256: "some-sha-two",
- Source: "some-source-two",
- SourceSHA256: "some-source-sha-two",
- },
- {
- CPE: "cpe-notation",
- PURL: "some-purl",
- ID: "some-dep",
- Licenses: []string{"fancy-license", "fancy-license-2"},
- Version: "1.5.6",
- Stacks: []string{"some-stack-three"},
- URI: "some-dep-uri-three",
- SHA256: "some-sha-three",
- Source: "some-source-three",
- SourceSHA256: "some-source-sha-three",
- },
- }))
- })
- })
-
- context("failure cases", func() {
- context("given an invalid constraint", func() {
- it("returns an error", func() {
- constraint := cargo.ConfigMetadataDependencyConstraint{
- Constraint: "abc",
- ID: "some-dep",
- Patches: 3,
- }
-
- _, err := internal.GetDependenciesWithinConstraint(allDependencies, constraint, "")
- Expect(err).To(MatchError("improper constraint: abc"))
- })
- })
-
- context("given a malformed dependency version", func() {
- it("returns an error", func() {
- constraint := cargo.ConfigMetadataDependencyConstraint{
- Constraint: "1.*",
- ID: "some-dep",
- Patches: 3,
- }
- dependencies := []internal.Dependency{
- {
- DeprecationDate: "",
- ID: "some-dep",
- SHA256: "some-sha",
- Source: "some-source",
- SourceSHA256: "some-source-sha",
- Stacks: []internal.Stack{
- {
- ID: "some-stack",
- },
- },
- URI: "some-dep-uri",
- Version: "v1.xx",
- CreatedAt: "sometime",
- ModifedAt: "another-time",
- CPE: "cpe-notation",
- PURL: "some-purl",
- Licenses: []string{"fancy-license", "fancy-license-2"},
- },
- }
-
- _, err := internal.GetDependenciesWithinConstraint(dependencies, constraint, "")
- Expect(err).To(MatchError("Invalid Semantic Version"))
- })
- })
- })
- })
-
- context("FindDependencyName", func() {
- var cargoConfig cargo.Config
- it.Before(func() {
- cargoConfig = cargo.Config{
- API: "0.2",
- Buildpack: cargo.ConfigBuildpack{
- ID: "some-buildpack-id",
- Name: "some-buildpack-name",
- Version: "some-buildpack-version",
- Homepage: "some-homepage-link",
- },
- Metadata: cargo.ConfigMetadata{
- Dependencies: []cargo.ConfigMetadataDependency{
- {
- ID: "some-dependency",
- Name: "Some Dependency Name",
- URI: "http://some-url",
- Version: "1.2.3",
- },
- },
- },
- }
- })
-
- context("given a dependency ID and valid cargo.Config that contain that dependency", func() {
- it("returns the name of the dependency from the Config", func() {
- name := internal.FindDependencyName("some-dependency", cargoConfig)
- Expect(name).To(Equal("Some Dependency Name"))
- })
- })
-
- context("given a dependency ID and a cargo.Config that does not contain that dependency", func() {
- it("returns the empty string", func() {
- name := internal.FindDependencyName("unmatched-dependency", cargoConfig)
- Expect(name).To(Equal(""))
- })
- })
- })
-}
diff --git a/cargo/jam/internal/fakes/downloader.go b/cargo/jam/internal/fakes/downloader.go
deleted file mode 100644
index 893ef2a7..00000000
--- a/cargo/jam/internal/fakes/downloader.go
+++ /dev/null
@@ -1,34 +0,0 @@
-package fakes
-
-import (
- "io"
- "sync"
-)
-
-type Downloader struct {
- DropCall struct {
- sync.Mutex
- CallCount int
- Receives struct {
- Root string
- Uri string
- }
- Returns struct {
- ReadCloser io.ReadCloser
- Error error
- }
- Stub func(string, string) (io.ReadCloser, error)
- }
-}
-
-func (f *Downloader) Drop(param1 string, param2 string) (io.ReadCloser, error) {
- f.DropCall.Lock()
- defer f.DropCall.Unlock()
- f.DropCall.CallCount++
- f.DropCall.Receives.Root = param1
- f.DropCall.Receives.Uri = param2
- if f.DropCall.Stub != nil {
- return f.DropCall.Stub(param1, param2)
- }
- return f.DropCall.Returns.ReadCloser, f.DropCall.Returns.Error
-}
diff --git a/cargo/jam/internal/fakes/executable.go b/cargo/jam/internal/fakes/executable.go
deleted file mode 100644
index 1fe72820..00000000
--- a/cargo/jam/internal/fakes/executable.go
+++ /dev/null
@@ -1,32 +0,0 @@
-package fakes
-
-import (
- "sync"
-
- "github.com/paketo-buildpacks/packit/pexec"
-)
-
-type Executable struct {
- ExecuteCall struct {
- sync.Mutex
- CallCount int
- Receives struct {
- Execution pexec.Execution
- }
- Returns struct {
- Error error
- }
- Stub func(pexec.Execution) error
- }
-}
-
-func (f *Executable) Execute(param1 pexec.Execution) error {
- f.ExecuteCall.Lock()
- defer f.ExecuteCall.Unlock()
- f.ExecuteCall.CallCount++
- f.ExecuteCall.Receives.Execution = param1
- if f.ExecuteCall.Stub != nil {
- return f.ExecuteCall.Stub(param1)
- }
- return f.ExecuteCall.Returns.Error
-}
diff --git a/cargo/jam/internal/file_bundler.go b/cargo/jam/internal/file_bundler.go
deleted file mode 100644
index 66d4a562..00000000
--- a/cargo/jam/internal/file_bundler.go
+++ /dev/null
@@ -1,119 +0,0 @@
-package internal
-
-import (
- "bytes"
- "fmt"
- "io"
- "os"
- "path/filepath"
- "strings"
- "time"
-
- "github.com/paketo-buildpacks/packit/cargo"
-)
-
-type File struct {
- io.ReadCloser
-
- Name string
- Info os.FileInfo
- Link string
-}
-
-type FileInfo struct {
- name string
- size int
- mode os.FileMode
- mtime time.Time
-}
-
-func NewFileInfo(name string, size int, mode os.FileMode, mtime time.Time) FileInfo {
- return FileInfo{
- name: name,
- size: size,
- mode: mode,
- mtime: mtime,
- }
-}
-
-func (fi FileInfo) Name() string {
- return fi.name
-}
-
-func (fi FileInfo) Size() int64 {
- return int64(fi.size)
-}
-
-func (fi FileInfo) Mode() os.FileMode {
- return fi.mode
-}
-
-func (fi FileInfo) ModTime() time.Time {
- return fi.mtime
-}
-
-func (fi FileInfo) IsDir() bool {
- return fi.Mode().IsDir()
-}
-
-func (fi FileInfo) Sys() interface{} {
- return nil
-}
-
-type FileBundler struct{}
-
-func NewFileBundler() FileBundler {
- return FileBundler{}
-}
-
-func (b FileBundler) Bundle(root string, paths []string, config cargo.Config) ([]File, error) {
- var files []File
-
- for _, path := range paths {
- file := File{Name: path}
-
- switch path {
- case "buildpack.toml":
- buf := bytes.NewBuffer(nil)
- err := cargo.EncodeConfig(buf, config)
- if err != nil {
- return nil, fmt.Errorf("error encoding buildpack.toml: %s", err)
- }
-
- file.ReadCloser = io.NopCloser(buf)
- file.Info = NewFileInfo("buildpack.toml", buf.Len(), 0644, time.Now())
-
- default:
- var err error
- file.Info, err = os.Lstat(filepath.Join(root, path))
- if err != nil {
- return nil, fmt.Errorf("error stating included file: %s", err)
- }
-
- if file.Info.Mode()&os.ModeType != 0 {
- link, err := os.Readlink(filepath.Join(root, path))
- if err != nil {
- return nil, fmt.Errorf("error readlinking included file: %s", err)
- }
-
- if !strings.HasPrefix(link, string(filepath.Separator)) {
- link = filepath.Clean(filepath.Join(root, link))
- }
-
- file.Link, err = filepath.Rel(root, link)
- if err != nil {
- return nil, fmt.Errorf("error finding relative link path: %s", err)
- }
- } else {
- file.ReadCloser, err = os.Open(filepath.Join(root, path))
- if err != nil {
- return nil, fmt.Errorf("error opening included file: %s", err)
- }
- }
- }
-
- files = append(files, file)
- }
-
- return files, nil
-}
diff --git a/cargo/jam/internal/file_bundler_test.go b/cargo/jam/internal/file_bundler_test.go
deleted file mode 100644
index 4d9821fe..00000000
--- a/cargo/jam/internal/file_bundler_test.go
+++ /dev/null
@@ -1,102 +0,0 @@
-package internal_test
-
-import (
- "io"
- "os"
- "path/filepath"
- "testing"
-
- "github.com/paketo-buildpacks/packit/cargo"
- "github.com/paketo-buildpacks/packit/cargo/jam/internal"
- "github.com/sclevine/spec"
-
- . "github.com/onsi/gomega"
- . "github.com/paketo-buildpacks/packit/matchers"
-)
-
-func testFileBundler(t *testing.T, context spec.G, it spec.S) {
- var (
- Expect = NewWithT(t).Expect
-
- fileBundler internal.FileBundler
- )
-
- it.Before(func() {
- fileBundler = internal.NewFileBundler()
- })
-
- context("Bundle", func() {
- it("returns a list of cargo files", func() {
- files, err := fileBundler.Bundle(filepath.Join("..", "testdata", "example-cnb"), []string{"bin/build", "bin/detect", "bin/link", "buildpack.toml"}, cargo.Config{
- API: "0.2",
- Buildpack: cargo.ConfigBuildpack{
- ID: "other-buildpack-id",
- Name: "other-buildpack-name",
- Version: "other-buildpack-version",
- },
- Metadata: cargo.ConfigMetadata{
- IncludeFiles: []string{
- "bin/build",
- "bin/detect",
- "bin/link",
- "buildpack.toml",
- },
- PrePackage: "some-pre-package-script.sh",
- },
- })
- Expect(err).NotTo(HaveOccurred())
-
- Expect(files).To(HaveLen(4))
-
- Expect(files[0].Name).To(Equal("bin/build"))
- Expect(files[0].Info.Size()).To(Equal(int64(14)))
- Expect(files[0].Info.Mode()).To(Equal(os.FileMode(0755)))
- Expect(files[0].Link).To(Equal(""))
-
- content, err := io.ReadAll(files[0])
- Expect(err).NotTo(HaveOccurred())
- Expect(string(content)).To(Equal("build-contents"))
-
- Expect(files[1].Name).To(Equal("bin/detect"))
- Expect(files[1].Info.Size()).To(Equal(int64(15)))
- Expect(files[1].Info.Mode()).To(Equal(os.FileMode(0755)))
- Expect(files[1].Link).To(Equal(""))
-
- content, err = io.ReadAll(files[1])
- Expect(err).NotTo(HaveOccurred())
- Expect(string(content)).To(Equal("detect-contents"))
-
- Expect(files[2].Name).To(Equal("bin/link"))
- Expect(files[2].Info.Size()).To(Equal(int64(7)))
- Expect(files[2].Info.Mode() & os.ModeSymlink).To(Equal(os.ModeSymlink))
- Expect(files[2].Link).To(Equal("build"))
- Expect(files[2].ReadCloser).To(BeNil())
-
- Expect(files[3].Name).To(Equal("buildpack.toml"))
- Expect(files[3].Info.Size()).To(Equal(int64(256)))
- Expect(files[3].Info.Mode()).To(Equal(os.FileMode(0644)))
- Expect(files[3].Link).To(Equal(""))
-
- content, err = io.ReadAll(files[3])
- Expect(err).NotTo(HaveOccurred())
- Expect(string(content)).To(MatchTOML(`api = "0.2"
-[buildpack]
-id = "other-buildpack-id"
-name = "other-buildpack-name"
-version = "other-buildpack-version"
-
-[metadata]
-include-files = ["bin/build", "bin/detect", "bin/link", "buildpack.toml"]
-pre-package = "some-pre-package-script.sh"`))
- })
-
- context("error cases", func() {
- context("when included file does not exist", func() {
- it("fails", func() {
- _, err := fileBundler.Bundle(filepath.Join("jam", "testdata", "example-cnb"), []string{"bin/fake/build", "bin/detect", "buildpack.toml"}, cargo.Config{})
- Expect(err).To(MatchError(ContainSubstring("error stating included file:")))
- })
- })
- })
- })
-}
diff --git a/cargo/jam/internal/formatter.go b/cargo/jam/internal/formatter.go
deleted file mode 100644
index 1c38e17b..00000000
--- a/cargo/jam/internal/formatter.go
+++ /dev/null
@@ -1,168 +0,0 @@
-package internal
-
-import (
- "encoding/json"
- "fmt"
- "io"
- "sort"
-
- "github.com/Masterminds/semver/v3"
- "github.com/paketo-buildpacks/packit/cargo"
-)
-
-type Formatter struct {
- writer io.Writer
-}
-
-func NewFormatter(writer io.Writer) Formatter {
- return Formatter{
- writer: writer,
- }
-}
-
-type depKey [3]string
-
-func printImplementation(writer io.Writer, config cargo.Config) {
- if len(config.Stacks) > 0 {
- sort.Slice(config.Stacks, func(i, j int) bool {
- return config.Stacks[i].ID < config.Stacks[j].ID
- })
-
- fmt.Fprintf(writer, "#### Supported Stacks:\n")
- for _, s := range config.Stacks {
- fmt.Fprintf(writer, "- %s\n", s.ID)
- }
- fmt.Fprintln(writer)
- }
-
- if len(config.Metadata.DefaultVersions) > 0 {
- fmt.Fprintf(writer, "#### Default Dependency Versions:\n| ID | Version |\n|---|---|\n")
- var sortedDependencies []string
- for key := range config.Metadata.DefaultVersions {
- sortedDependencies = append(sortedDependencies, key)
- }
-
- sort.Strings(sortedDependencies)
-
- for _, key := range sortedDependencies {
- fmt.Fprintf(writer, "| %s | %s |\n", key, config.Metadata.DefaultVersions[key])
- }
- fmt.Fprintln(writer)
- }
-
- if len(config.Metadata.Dependencies) > 0 {
- infoMap := map[depKey][]string{}
- for _, d := range config.Metadata.Dependencies {
- key := depKey{d.ID, d.Version, d.SHA256}
- _, ok := infoMap[key]
- if !ok {
- sort.Strings(d.Stacks)
- infoMap[key] = d.Stacks
- } else {
- val := infoMap[key]
- val = append(val, d.Stacks...)
- sort.Strings(val)
- infoMap[key] = val
- }
- }
-
- var sorted []cargo.ConfigMetadataDependency
- for key, stacks := range infoMap {
- sorted = append(sorted, cargo.ConfigMetadataDependency{
- ID: key[0],
- Version: key[1],
- Stacks: stacks,
- SHA256: key[2],
- })
- }
-
- sort.Slice(sorted, func(i, j int) bool {
- iVal := sorted[i]
- jVal := sorted[j]
-
- if iVal.ID < jVal.ID {
- return true
- }
-
- iVersion := semver.MustParse(iVal.Version)
- jVersion := semver.MustParse(jVal.Version)
-
- return iVal.ID == jVal.ID && iVersion.GreaterThan(jVersion)
- })
-
- fmt.Fprintf(writer, "#### Dependencies:\n| Name | Version | SHA256 |\n|---|---|---|\n")
- for _, d := range sorted {
- fmt.Fprintf(writer, "| %s | %s | %s |\n", d.ID, d.Version, d.SHA256)
- }
- fmt.Fprintln(writer)
- }
-
-}
-
-func (f Formatter) Markdown(configs []cargo.Config) {
- //Language-family case
- if len(configs) > 1 {
- var familyConfig cargo.Config
- for index, config := range configs {
- if len(config.Order) > 0 {
- familyConfig = config
- configs = append(configs[:index], configs[index+1:]...)
- break
- }
- }
-
- //Header section
- fmt.Fprintf(f.writer, "## %s %s\n\n**ID:** `%s`\n\n", familyConfig.Buildpack.Name, familyConfig.Buildpack.Version, familyConfig.Buildpack.ID)
- fmt.Fprintf(f.writer, "**Digest:** `%s`\n\n", familyConfig.Buildpack.SHA256)
- fmt.Fprintf(f.writer, "#### Included Buildpackages:\n")
- fmt.Fprintf(f.writer, "| Name | ID | Version |\n|---|---|---|\n")
- for _, config := range configs {
- fmt.Fprintf(f.writer, "| %s | %s | %s |\n", config.Buildpack.Name, config.Buildpack.ID, config.Buildpack.Version)
- }
- //Sub Header
- fmt.Fprintf(f.writer, "\n\nOrder Groupings
\n\n")
- for _, o := range familyConfig.Order {
- fmt.Fprintf(f.writer, "| ID | Version | Optional |\n|---|---|---|\n")
- for _, g := range o.Group {
- fmt.Fprintf(f.writer, "| %s | %s | %t |\n", g.ID, g.Version, g.Optional)
- }
- fmt.Fprintln(f.writer)
- }
- fmt.Fprintf(f.writer, " \n\n---\n")
-
- for _, config := range configs {
- fmt.Fprintf(f.writer, "\n\n%s %s
\n", config.Buildpack.Name, config.Buildpack.Version)
- fmt.Fprintf(f.writer, "\n**ID:** `%s`\n\n", config.Buildpack.ID)
- printImplementation(f.writer, config)
- fmt.Fprintf(f.writer, "---\n\n \n")
- }
-
- } else { //Implementation case
- fmt.Fprintf(f.writer, "## %s %s\n", configs[0].Buildpack.Name, configs[0].Buildpack.Version)
- fmt.Fprintf(f.writer, "\n**ID:** `%s`\n\n", configs[0].Buildpack.ID)
- fmt.Fprintf(f.writer, "**Digest:** `%s`\n\n", configs[0].Buildpack.SHA256)
- printImplementation(f.writer, configs[0])
- }
-
-}
-
-func (f Formatter) JSON(configs []cargo.Config) {
- var output struct {
- Buildpackage cargo.Config `json:"buildpackage"`
- Children []cargo.Config `json:"children,omitempty"`
- }
-
- output.Buildpackage = configs[0]
-
- if len(configs) > 1 {
- for _, config := range configs {
- if len(config.Order) > 0 {
- output.Buildpackage = config
- } else {
- output.Children = append(output.Children, config)
- }
- }
- }
-
- _ = json.NewEncoder(f.writer).Encode(&output)
-}
diff --git a/cargo/jam/internal/formatter_test.go b/cargo/jam/internal/formatter_test.go
deleted file mode 100644
index e05cfba7..00000000
--- a/cargo/jam/internal/formatter_test.go
+++ /dev/null
@@ -1,527 +0,0 @@
-package internal_test
-
-import (
- "bytes"
- "testing"
-
- "github.com/paketo-buildpacks/packit/cargo"
- "github.com/paketo-buildpacks/packit/cargo/jam/internal"
- "github.com/sclevine/spec"
-
- . "github.com/onsi/gomega"
-)
-
-func testFormatter(t *testing.T, context spec.G, it spec.S) {
- var (
- Expect = NewWithT(t).Expect
-
- buffer *bytes.Buffer
- formatter internal.Formatter
- )
-
- it.Before(func() {
- buffer = bytes.NewBuffer(nil)
- formatter = internal.NewFormatter(buffer)
- })
-
- context("Markdown", func() {
- it("returns a list of dependencies", func() {
- formatter.Markdown([]cargo.Config{
- {
- Buildpack: cargo.ConfigBuildpack{
- ID: "some-buildpack",
- Name: "Some Buildpack",
- Version: "some-version",
- SHA256: "sha256:some-buildpack-sha",
- },
- Metadata: cargo.ConfigMetadata{
- Dependencies: []cargo.ConfigMetadataDependency{
- {
- ID: "some-dependency",
- Stacks: []string{"some-stack"},
- Version: "1.2.3",
- SHA256: "one-more-sha",
- Source: "some-source",
- SourceSHA256: "source-sha",
- },
- {
- ID: "some-dependency",
- Stacks: []string{"other-stack"},
- Version: "1.2.3",
- SHA256: "one-more-sha",
- },
- {
- ID: "other-dependency",
- Stacks: []string{"some-stack", "other-stack"},
- Version: "2.3.4",
- SHA256: "another-sha",
- },
- {
- ID: "other-dependency",
- Stacks: []string{"other-stack"},
- Version: "2.3.5",
- SHA256: "some-sha",
- },
- },
- DefaultVersions: map[string]string{
- "some-dependency": "1.2.x",
- "other-dependency": "2.3.x",
- },
- },
- Stacks: []cargo.ConfigStack{
- {ID: "some-stack"},
- {ID: "other-stack"},
- },
- },
- })
- Expect(buffer.String()).To(Equal(`## Some Buildpack some-version` +
-
- "\n\n**ID:** `some-buildpack`\n\n" +
-
- "**Digest:** `sha256:some-buildpack-sha`" +
-
- `
-
-#### Supported Stacks:
-- other-stack
-- some-stack
-
-#### Default Dependency Versions:
-| ID | Version |
-|---|---|
-| other-dependency | 2.3.x |
-| some-dependency | 1.2.x |
-
-#### Dependencies:
-| Name | Version | SHA256 |
-|---|---|---|
-| other-dependency | 2.3.5 | some-sha |
-| other-dependency | 2.3.4 | another-sha |
-| some-dependency | 1.2.3 | one-more-sha |
-
-`))
- })
-
- context("when dependencies and default-versions are empty", func() {
- it("returns a list of dependencies", func() {
- formatter.Markdown([]cargo.Config{
- {
- Buildpack: cargo.ConfigBuildpack{
- ID: "some-buildpack",
- Name: "Some Buildpack",
- Version: "some-version",
- SHA256: "sha256:some-buildpack-sha",
- },
- Stacks: []cargo.ConfigStack{
- {ID: "some-stack"},
- {ID: "other-stack"},
- },
- },
- })
- Expect(buffer.String()).To(Equal(`## Some Buildpack some-version` +
-
- "\n\n**ID:** `some-buildpack`\n\n" +
-
- "**Digest:** `sha256:some-buildpack-sha`" +
-
- `
-
-#### Supported Stacks:
-- other-stack
-- some-stack
-
-`))
- })
- })
-
- context("when stacks are empty", func() {
- it("returns a list of dependencies", func() {
- formatter.Markdown([]cargo.Config{
- {
- Buildpack: cargo.ConfigBuildpack{
- ID: "some-buildpack",
- Name: "Some Buildpack",
- Version: "some-version",
- SHA256: "sha256:some-buildpack-sha",
- },
- Metadata: cargo.ConfigMetadata{
- Dependencies: []cargo.ConfigMetadataDependency{
- {
- ID: "some-dependency",
- Stacks: []string{"some-stack"},
- Version: "1.2.3",
- SHA256: "one-more-sha",
- },
- {
- ID: "some-dependency",
- Stacks: []string{"other-stack"},
- Version: "1.2.3",
- SHA256: "one-more-sha",
- },
- {
- ID: "other-dependency",
- Stacks: []string{"some-stack", "other-stack"},
- Version: "2.3.4",
- SHA256: "another-sha",
- },
- {
- ID: "other-dependency",
- Stacks: []string{"other-stack"},
- Version: "2.3.5",
- SHA256: "some-sha",
- },
- },
- DefaultVersions: map[string]string{
- "some-dependency": "1.2.x",
- "other-dependency": "2.3.x",
- },
- },
- },
- })
- Expect(buffer.String()).To(Equal(`## Some Buildpack some-version` +
-
- "\n\n**ID:** `some-buildpack`\n\n" +
-
- "**Digest:** `sha256:some-buildpack-sha`" +
-
- `
-
-#### Default Dependency Versions:
-| ID | Version |
-|---|---|
-| other-dependency | 2.3.x |
-| some-dependency | 1.2.x |
-
-#### Dependencies:
-| Name | Version | SHA256 |
-|---|---|---|
-| other-dependency | 2.3.5 | some-sha |
-| other-dependency | 2.3.4 | another-sha |
-| some-dependency | 1.2.3 | one-more-sha |
-
-`))
- })
- })
-
- context("when there are order groupings", func() {
- it("prints the order groupings", func() {
- formatter.Markdown([]cargo.Config{
- {
- Buildpack: cargo.ConfigBuildpack{
- ID: "order-buildpack",
- Name: "Order Buildpack",
- Version: "order-version",
- SHA256: "sha256:order-buildpack-sha",
- },
- Order: []cargo.ConfigOrder{
- {
- Group: []cargo.ConfigOrderGroup{
- {
- ID: "some-buildpack",
- Version: "1.2.3",
- },
- {
- ID: "optional-buildpack",
- Version: "2.3.4",
- Optional: true,
- },
- },
- },
- {
- Group: []cargo.ConfigOrderGroup{
- {
- ID: "some-buildpack",
- Version: "1.2.3",
- },
- {
- ID: "other-buildpack",
- Version: "3.4.5",
- },
- },
- },
- },
- },
- {
- Buildpack: cargo.ConfigBuildpack{
- ID: "some-buildpack",
- Name: "Some Buildpack",
- Version: "1.2.3",
- },
- },
- {
- Buildpack: cargo.ConfigBuildpack{
- ID: "optional-buildpack",
- Name: "Optional Buildpack",
- Version: "2.3.4",
- },
- },
- {
- Buildpack: cargo.ConfigBuildpack{
- ID: "other-buildpack",
- Name: "Other Buildpack",
- Version: "3.4.5",
- },
- },
- })
- Expect(buffer.String()).To(Equal(`## Order Buildpack order-version` +
-
- "\n\n**ID:** `order-buildpack`\n\n" +
-
- "**Digest:** `sha256:order-buildpack-sha`" +
-
- `
-
-#### Included Buildpackages:
-| Name | ID | Version |
-|---|---|---|
-| Some Buildpack | some-buildpack | 1.2.3 |
-| Optional Buildpack | optional-buildpack | 2.3.4 |
-| Other Buildpack | other-buildpack | 3.4.5 |
-
-
-Order Groupings
-
-| ID | Version | Optional |
-|---|---|---|
-| some-buildpack | 1.2.3 | false |
-| optional-buildpack | 2.3.4 | true |
-
-| ID | Version | Optional |
-|---|---|---|
-| some-buildpack | 1.2.3 | false |
-| other-buildpack | 3.4.5 | false |
-
-
-
----
-
-
-Some Buildpack 1.2.3
` +
-
- "\n\n**ID:** `some-buildpack`\n\n" +
-
- `---
-
-
-
-
-Optional Buildpack 2.3.4
` +
-
- "\n\n**ID:** `optional-buildpack`\n\n" +
-
- `---
-
-
-
-
-Other Buildpack 3.4.5
` +
-
- "\n\n**ID:** `other-buildpack`\n\n" +
-
- `---
-
-
-`))
- })
- })
- })
-
- context("JSON", func() {
- it("returns a list of dependencies", func() {
- formatter.JSON([]cargo.Config{
- {
- Buildpack: cargo.ConfigBuildpack{
- ID: "some-buildpack",
- Version: "some-version",
- },
- Metadata: cargo.ConfigMetadata{
- Dependencies: []cargo.ConfigMetadataDependency{
- {
- ID: "some-dependency",
- Stacks: []string{"some-stack"},
- Version: "1.2.3",
- },
- {
- ID: "some-dependency",
- Stacks: []string{"other-stack"},
- Version: "1.2.3",
- },
- {
- ID: "other-dependency",
- Stacks: []string{"some-stack", "other-stack"},
- Version: "2.3.4",
- },
- {
- ID: "other-dependency",
- Stacks: []string{"other-stack"},
- Version: "2.3.5",
- },
- },
- DefaultVersions: map[string]string{
- "some-dependency": "1.2.x",
- "other-dependency": "2.3.x",
- },
- },
- Stacks: []cargo.ConfigStack{
- {ID: "some-stack"},
- {ID: "other-stack"},
- },
- },
- })
- Expect(buffer.String()).To(MatchJSON(`{
- "buildpackage": {
- "buildpack": {
- "id": "some-buildpack",
- "version": "some-version"
- },
- "metadata": {
- "default-versions": {
- "some-dependency": "1.2.x",
- "other-dependency": "2.3.x"
- },
- "dependencies": [{
- "id": "some-dependency",
- "stacks": [
- "some-stack"
- ],
- "version": "1.2.3"
- }, {
- "id": "some-dependency",
- "stacks": [
- "other-stack"
- ],
- "version": "1.2.3"
- }, {
- "id": "other-dependency",
- "stacks": [
- "some-stack",
- "other-stack"
- ],
- "version": "2.3.4"
- }, {
- "id": "other-dependency",
- "stacks": [
- "other-stack"
- ],
- "version": "2.3.5"
- }]
- },
- "stacks": [{
- "id": "some-stack"
- },
- {
- "id": "other-stack"
- }
- ]
- }
-}`))
- })
-
- context("when buildpackage is a meta buildpackage", func() {
- it("prints the meta buildpackage info and the info of all its children", func() {
- formatter.JSON([]cargo.Config{
- {
- Buildpack: cargo.ConfigBuildpack{
- ID: "some-buildpack",
- Version: "some-version",
- },
- Metadata: cargo.ConfigMetadata{
- Dependencies: []cargo.ConfigMetadataDependency{
- {
- ID: "some-dependency",
- Stacks: []string{"some-stack"},
- Version: "1.2.3",
- },
- },
- DefaultVersions: map[string]string{
- "some-dependency": "1.2.x",
- },
- },
- Stacks: []cargo.ConfigStack{
- {ID: "some-stack"},
- },
- },
- {
- Buildpack: cargo.ConfigBuildpack{
- ID: "some-buildpack",
- Version: "some-version",
- },
- Order: []cargo.ConfigOrder{
- {
- Group: []cargo.ConfigOrderGroup{
- {
- ID: "some-buildpack",
- Version: "1.2.3",
- },
- {
- ID: "optional-buildpack",
- Version: "2.3.4",
- Optional: true,
- },
- },
- },
- {
- Group: []cargo.ConfigOrderGroup{
- {
- ID: "other-buildpack",
- Version: "3.4.5",
- },
- },
- },
- },
- },
- })
- Expect(buffer.String()).To(MatchJSON(`{
- "buildpackage": {
- "buildpack": {
- "id": "some-buildpack",
- "version": "some-version"
- },
- "metadata": {},
- "order": [{
- "group": [{
- "id": "some-buildpack",
- "version": "1.2.3"
- },
- {
- "id": "optional-buildpack",
- "version": "2.3.4",
- "optional": true
- }
- ]
-
- },
- {
- "group": [{
- "id": "other-buildpack",
- "version": "3.4.5"
- }]
- }
- ]
- },
- "children": [{
- "buildpack": {
- "id": "some-buildpack",
- "version": "some-version"
- },
- "metadata": {
- "default-versions": {
- "some-dependency": "1.2.x"
- },
- "dependencies": [{
- "id": "some-dependency",
- "stacks": [
- "some-stack"
- ],
- "version": "1.2.3"
- }]
- },
- "stacks": [{
- "id": "some-stack"
- }]
- }]
-}`))
- })
- })
- })
-}
diff --git a/cargo/jam/internal/image.go b/cargo/jam/internal/image.go
deleted file mode 100644
index 6363b255..00000000
--- a/cargo/jam/internal/image.go
+++ /dev/null
@@ -1,153 +0,0 @@
-package internal
-
-import (
- "encoding/json"
- "fmt"
- "sort"
- "strings"
-
- "github.com/Masterminds/semver/v3"
- "github.com/docker/distribution/reference"
- "github.com/google/go-containerregistry/pkg/authn"
- "github.com/google/go-containerregistry/pkg/name"
- "github.com/google/go-containerregistry/pkg/v1/remote"
-)
-
-type Image struct {
- Name string
- Path string
- Version string
-}
-
-func FindLatestImage(uri string) (Image, error) {
- named, err := reference.ParseNormalizedNamed(uri)
- if err != nil {
- return Image{}, fmt.Errorf("failed to parse image reference %q: %w", uri, err)
- }
-
- repo, err := name.NewRepository(reference.Path(named))
- if err != nil {
- return Image{}, fmt.Errorf("failed to parse image repository: %w", err)
- }
-
- repo.Registry, err = name.NewRegistry(reference.Domain(named))
- if err != nil {
- return Image{}, fmt.Errorf("failed to parse image registry: %w", err)
- }
-
- tags, err := remote.List(repo, remote.WithAuthFromKeychain(authn.DefaultKeychain))
- if err != nil {
- return Image{}, fmt.Errorf("failed to list tags: %w", err)
- }
-
- var versions []*semver.Version
- for _, tag := range tags {
- version, err := semver.StrictNewVersion(tag)
- if err != nil {
- continue
- }
- if version.Prerelease() != "" {
- continue
- }
-
- versions = append(versions, version)
- }
-
- sort.Sort(semver.Collection(versions))
-
- return Image{
- Name: named.Name(),
- Path: reference.Path(named),
- Version: versions[len(versions)-1].String(),
- }, nil
-}
-
-func FindLatestBuildImage(runURI, buildURI string) (Image, error) {
- runNamed, err := reference.ParseNormalizedNamed(runURI)
- if err != nil {
- return Image{}, fmt.Errorf("failed to parse run image reference %q: %w", runURI, err)
- }
-
- tagged, ok := runNamed.(reference.Tagged)
- if !ok {
- return Image{}, fmt.Errorf("expected the run image to be tagged but it was not")
- }
-
- suffix := fmt.Sprintf("-%s", tagged.Tag())
-
- buildNamed, err := reference.ParseNormalizedNamed(buildURI)
- if err != nil {
- return Image{}, fmt.Errorf("failed to parse build image reference %q: %w", buildURI, err)
- }
-
- repo, err := name.NewRepository(reference.Path(buildNamed))
- if err != nil {
- return Image{}, fmt.Errorf("failed to parse build image repository: %w", err)
- }
-
- repo.Registry, err = name.NewRegistry(reference.Domain(buildNamed))
- if err != nil {
- return Image{}, fmt.Errorf("failed to parse build image registry: %w", err)
- }
-
- tags, err := remote.List(repo, remote.WithAuthFromKeychain(authn.DefaultKeychain))
- if err != nil {
- return Image{}, fmt.Errorf("failed to list tags: %w", err)
- }
-
- var versions []*semver.Version
- for _, tag := range tags {
- if !strings.HasSuffix(tag, suffix) {
- continue
- }
-
- version, err := semver.StrictNewVersion(strings.TrimSuffix(tag, suffix))
- if err != nil {
- continue
- }
-
- versions = append(versions, version)
- }
-
- sort.Sort(semver.Collection(versions))
-
- return Image{
- Name: buildNamed.Name(),
- Path: reference.Path(buildNamed),
- Version: fmt.Sprintf("%s%s", versions[len(versions)-1].String(), suffix),
- }, nil
-}
-
-func GetBuildpackageID(uri string) (string, error) {
- ref, err := name.ParseReference(uri)
- if err != nil {
- return "", err
- }
-
- image, err := remote.Image(ref, remote.WithAuthFromKeychain(authn.DefaultKeychain))
- if err != nil {
- return "", err
- }
-
- cfg, err := image.ConfigFile()
- if err != nil {
- return "", err
- }
-
- type BuildpackageMetadata struct {
- BuildpackageID string `json:"id"`
- }
- var metadataString string
- var ok bool
- if metadataString, ok = cfg.Config.Labels["io.buildpacks.buildpackage.metadata"]; !ok {
- return "", fmt.Errorf("could not get buildpackage id: image %s has no label 'io.buildpacks.buildpackage.metadata'", uri)
- }
-
- metadata := BuildpackageMetadata{}
-
- err = json.Unmarshal([]byte(metadataString), &metadata)
- if err != nil {
- return "", fmt.Errorf("could not unmarshal buildpackage metadata")
- }
- return metadata.BuildpackageID, nil
-}
diff --git a/cargo/jam/internal/image_test.go b/cargo/jam/internal/image_test.go
deleted file mode 100644
index bedc2405..00000000
--- a/cargo/jam/internal/image_test.go
+++ /dev/null
@@ -1,272 +0,0 @@
-package internal_test
-
-import (
- "fmt"
- "net/http"
- "net/http/httptest"
- "os"
- "path/filepath"
- "strings"
- "testing"
-
- "github.com/paketo-buildpacks/packit/cargo/jam/internal"
- "github.com/sclevine/spec"
-
- . "github.com/onsi/gomega"
-)
-
-func testImage(t *testing.T, context spec.G, it spec.S) {
- var (
- Expect = NewWithT(t).Expect
-
- server *httptest.Server
- dockerConfig string
- )
-
- context("FindLatestImage", func() {
- it.Before(func() {
- server = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
- if req.Header.Get("Authorization") != "Basic c29tZS11c2VybmFtZTpzb21lLXBhc3N3b3Jk" {
- w.Header().Set("WWW-Authenticate", `Basic realm="localhost"`)
- w.WriteHeader(http.StatusUnauthorized)
- return
- }
-
- switch req.URL.Path {
- case "/v2/":
- w.WriteHeader(http.StatusOK)
-
- case "/v2/some-org/some-repo/tags/list":
- w.WriteHeader(http.StatusOK)
- fmt.Fprintln(w, `{
- "tags": [
- "0.0.10",
- "0.20.1",
- "0.20.12",
- "999999",
- "latest",
- "0.20.13-rc1"
- ]
- }`)
-
- case "/v2/some-org/error-repo/tags/list":
- w.WriteHeader(http.StatusTeapot)
-
- default:
- t.Fatal(fmt.Sprintf("unknown path: %s", req.URL.Path))
- }
- }))
-
- var err error
- dockerConfig, err = os.MkdirTemp("", "docker-config")
- Expect(err).NotTo(HaveOccurred())
-
- contents := fmt.Sprintf(`{
- "auths": {
- %q: {
- "username": "some-username",
- "password": "some-password"
- }
- }
- }`, strings.TrimPrefix(server.URL, "http://"))
-
- err = os.WriteFile(filepath.Join(dockerConfig, "config.json"), []byte(contents), 0600)
- Expect(err).NotTo(HaveOccurred())
-
- Expect(os.Setenv("DOCKER_CONFIG", dockerConfig)).To(Succeed())
- })
-
- it.After(func() {
- Expect(os.Unsetenv("DOCKER_CONFIG")).To(Succeed())
- Expect(os.RemoveAll(dockerConfig)).To(Succeed())
- })
-
- it("returns the latest non-prerelease semver tag for the given image uri", func() {
- image, err := internal.FindLatestImage(fmt.Sprintf("%s/some-org/some-repo:latest", strings.TrimPrefix(server.URL, "http://")))
- Expect(err).NotTo(HaveOccurred())
- Expect(image).To(Equal(internal.Image{
- Name: fmt.Sprintf("%s/some-org/some-repo", strings.TrimPrefix(server.URL, "http://")),
- Path: "some-org/some-repo",
- Version: "0.20.12",
- }))
- })
-
- context("failure cases", func() {
- context("when the uri cannot be parsed", func() {
- it("returns an error", func() {
- _, err := internal.FindLatestImage("not a valid uri")
- Expect(err).To(MatchError("failed to parse image reference \"not a valid uri\": invalid reference format"))
- })
- })
-
- context("when the repo name cannot be parsed", func() {
- it("returns an error", func() {
- _, err := internal.FindLatestImage(fmt.Sprintf("%s/a:latest", strings.TrimPrefix(server.URL, "http://")))
- Expect(err).To(MatchError("failed to parse image repository: repository must be between 2 and 255 runes in length: a"))
- })
- })
-
- context("when the tags cannot be listed", func() {
- it("returns an error", func() {
- _, err := internal.FindLatestImage(fmt.Sprintf("%s/some-org/error-repo:latest", strings.TrimPrefix(server.URL, "http://")))
- Expect(err).To(MatchError(ContainSubstring("failed to list tags:")))
- Expect(err).To(MatchError(ContainSubstring("status code 418")))
- })
- })
- })
- }, spec.Sequential())
-
- context("FindLatestBuildImage", func() {
- it.Before(func() {
- server = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
- if req.Header.Get("Authorization") != "Basic c29tZS11c2VybmFtZTpzb21lLXBhc3N3b3Jk" {
- w.Header().Set("WWW-Authenticate", `Basic realm="localhost"`)
- w.WriteHeader(http.StatusUnauthorized)
- return
- }
-
- switch req.URL.Path {
- case "/v2/":
- w.WriteHeader(http.StatusOK)
-
- case "/v2/some-org/some-repo-build/tags/list":
- w.WriteHeader(http.StatusOK)
- fmt.Fprintln(w, `{
- "tags": [
- "0.0.10-some-cnb",
- "0.20.1",
- "0.20.12-some-cnb",
- "0.20.12-other-cnb",
- "999999-some-cnb",
- "latest"
- ]
- }`)
-
- case "/v2/some-org/error-repo/tags/list":
- w.WriteHeader(http.StatusTeapot)
-
- default:
- t.Fatal(fmt.Sprintf("unknown path: %s", req.URL.Path))
- }
- }))
-
- var err error
- dockerConfig, err = os.MkdirTemp("", "docker-config")
- Expect(err).NotTo(HaveOccurred())
-
- contents := fmt.Sprintf(`{
- "auths": {
- %q: {
- "username": "some-username",
- "password": "some-password"
- }
- }
- }`, strings.TrimPrefix(server.URL, "http://"))
-
- err = os.WriteFile(filepath.Join(dockerConfig, "config.json"), []byte(contents), 0600)
- Expect(err).NotTo(HaveOccurred())
-
- Expect(os.Setenv("DOCKER_CONFIG", dockerConfig)).To(Succeed())
- })
-
- it.After(func() {
- Expect(os.Unsetenv("DOCKER_CONFIG")).To(Succeed())
- Expect(os.RemoveAll(dockerConfig)).To(Succeed())
- })
-
- it("returns the latest semver tag for the given image uri", func() {
- image, err := internal.FindLatestBuildImage(
- fmt.Sprintf("%s/some-org/some-repo-run:some-cnb", strings.TrimPrefix(server.URL, "http://")),
- fmt.Sprintf("%s/some-org/some-repo-build:0.0.10-some-cnb", strings.TrimPrefix(server.URL, "http://")),
- )
- Expect(err).NotTo(HaveOccurred())
- Expect(image).To(Equal(internal.Image{
- Name: fmt.Sprintf("%s/some-org/some-repo-build", strings.TrimPrefix(server.URL, "http://")),
- Path: "some-org/some-repo-build",
- Version: "0.20.12-some-cnb",
- }))
- })
-
- context("failure cases", func() {
- context("when the run uri cannot be parsed", func() {
- it("returns an error", func() {
- _, err := internal.FindLatestBuildImage(
- "not a valid uri",
- fmt.Sprintf("%s/some-org/some-repo-build:0.0.10-some-cnb", strings.TrimPrefix(server.URL, "http://")),
- )
- Expect(err).To(MatchError("failed to parse run image reference \"not a valid uri\": invalid reference format"))
- })
- })
-
- context("when the run image is not tagged", func() {
- it("returns an error", func() {
- _, err := internal.FindLatestBuildImage(
- fmt.Sprintf("%s/some-org/some-repo-run", strings.TrimPrefix(server.URL, "http://")),
- fmt.Sprintf("%s/some-org/some-repo-build:0.0.10-some-cnb", strings.TrimPrefix(server.URL, "http://")),
- )
- Expect(err).To(MatchError("expected the run image to be tagged but it was not"))
- })
- })
-
- context("when the build uri cannot be parsed", func() {
- it("returns an error", func() {
- _, err := internal.FindLatestBuildImage(
- fmt.Sprintf("%s/some-org/some-repo-run:some-cnb", strings.TrimPrefix(server.URL, "http://")),
- "not a valid uri",
- )
- Expect(err).To(MatchError("failed to parse build image reference \"not a valid uri\": invalid reference format"))
- })
- })
-
- context("when the repo name cannot be parsed", func() {
- it("returns an error", func() {
- _, err := internal.FindLatestBuildImage(
- fmt.Sprintf("%s/some-org/some-repo-run:some-cnb", strings.TrimPrefix(server.URL, "http://")),
- fmt.Sprintf("%s/a:latest", strings.TrimPrefix(server.URL, "http://")),
- )
- Expect(err).To(MatchError("failed to parse build image repository: repository must be between 2 and 255 runes in length: a"))
- })
- })
-
- context("when the tags cannot be listed", func() {
- it("returns an error", func() {
- _, err := internal.FindLatestBuildImage(
- fmt.Sprintf("%s/some-org/some-repo-run:some-cnb", strings.TrimPrefix(server.URL, "http://")),
- fmt.Sprintf("%s/some-org/error-repo:latest", strings.TrimPrefix(server.URL, "http://")),
- )
- Expect(err).To(MatchError(ContainSubstring("failed to list tags:")))
- Expect(err).To(MatchError(ContainSubstring("status code 418")))
- })
- })
- })
- }, spec.Sequential())
-
- context("GetBuildpackageID", func() {
- it("returns the buildpackage ID from the io.buildpacks.buildpackage.metadata image label", func() {
- id, err := internal.GetBuildpackageID("gcr.io/paketo-buildpacks/go")
- Expect(err).NotTo(HaveOccurred())
- Expect(id).To(Equal("paketo-buildpacks/go"))
- })
-
- context("failure cases", func() {
- context("uri cannot be parsed", func() {
- it("returns an error", func() {
- _, err := internal.GetBuildpackageID("some garbage uri")
- Expect(err).To(MatchError(ContainSubstring("could not parse reference")))
- })
- })
- context("image cannot be created from ref", func() {
- it("returns an error", func() {
- _, err := internal.GetBuildpackageID("gcr.io/does-not-exist/go:0.5.0")
- Expect(err).To(MatchError(ContainSubstring("Project 'project:does-not-exist' not found or deleted")))
- })
- })
- context("image has no buildpackage metadata label", func() {
- it("returns an error", func() {
- _, err := internal.GetBuildpackageID("gcr.io/paketo-buildpacks/builder:base")
- Expect(err).To(MatchError(ContainSubstring("could not get buildpackage id: image gcr.io/paketo-buildpacks/builder:base has no label 'io.buildpacks.buildpackage.metadata'")))
- })
- })
- })
- })
-}
diff --git a/cargo/jam/internal/init_test.go b/cargo/jam/internal/init_test.go
deleted file mode 100644
index aaf01b55..00000000
--- a/cargo/jam/internal/init_test.go
+++ /dev/null
@@ -1,78 +0,0 @@
-package internal_test
-
-import (
- "archive/tar"
- "compress/gzip"
- "errors"
- "fmt"
- "io"
- "os"
- "testing"
- "time"
-
- "github.com/onsi/gomega"
- "github.com/sclevine/spec"
- "github.com/sclevine/spec/report"
-)
-
-func TestUnitCargo(t *testing.T) {
- gomega.SetDefaultEventuallyTimeout(10 * time.Second)
-
- suite := spec.New("cargo/jam/internal", spec.Report(report.Terminal{}))
- suite("BuilderConfig", testBuilderConfig)
- suite("BuildpackConfig", testBuildpackConfig)
- suite("BuildpackInspector", testBuildpackInspector)
- suite("DependencyCacher", testDependencyCacher)
- suite("Dependency", testDependency)
- suite("FileBundler", testFileBundler)
- suite("Formatter", testFormatter)
- suite("Image", testImage)
- suite("PrePackager", testPrePackager)
- suite("PackageConfig", testPackageConfig)
- suite("TarBuilder", testTarBuilder)
- suite.Run(t)
-}
-
-func ExtractFile(file *os.File, name string) ([]byte, *tar.Header, error) {
- _, err := file.Seek(0, 0)
- if err != nil {
- return nil, nil, err
- }
-
- //TODO: Replace me with decompression library
- gzr, err := gzip.NewReader(file)
- if err != nil {
- return nil, nil, err
- }
- defer gzr.Close()
-
- tr := tar.NewReader(gzr)
-
- for {
- hdr, err := tr.Next()
- if err != nil {
- if err == io.EOF {
- break
- }
-
- return nil, nil, err
- }
-
- if hdr.Name == name {
- contents, err := io.ReadAll(tr)
- if err != nil {
- return nil, nil, err
- }
-
- return contents, hdr, nil
- }
- }
-
- return nil, nil, fmt.Errorf("no such file: %s", name)
-}
-
-type errorReader struct{}
-
-func (r errorReader) Read(p []byte) (int, error) {
- return 0, errors.New("failed to read")
-}
diff --git a/cargo/jam/internal/package_config.go b/cargo/jam/internal/package_config.go
deleted file mode 100644
index b82d598f..00000000
--- a/cargo/jam/internal/package_config.go
+++ /dev/null
@@ -1,81 +0,0 @@
-package internal
-
-import (
- "fmt"
- "net/url"
- "os"
- "strings"
-
- "github.com/pelletier/go-toml"
-)
-
-type PackageConfig struct {
- Buildpack interface{} `toml:"buildpack"`
- Dependencies []PackageConfigDependency `toml:"dependencies"`
-}
-
-type PackageConfigDependency struct {
- URI string `toml:"uri"`
-}
-
-// Note: this is to support that buildpackages can refer to this field as `image` or `uri`.
-func (d *PackageConfigDependency) UnmarshalTOML(v interface{}) error {
- if m, ok := v.(map[string]interface{}); ok {
- if image, ok := m["image"].(string); ok {
- d.URI = image
- }
-
- if uri, ok := m["uri"].(string); ok {
- d.URI = uri
- }
- }
-
- if d.URI != "" {
- uri, err := url.Parse(d.URI)
- if err != nil {
- return err
- }
-
- uri.Scheme = ""
-
- d.URI = strings.TrimPrefix(uri.String(), "//")
- }
-
- return nil
-}
-
-func ParsePackageConfig(path string) (PackageConfig, error) {
- file, err := os.Open(path)
- if err != nil {
- return PackageConfig{}, fmt.Errorf("failed to open package config file: %w", err)
- }
- defer file.Close()
-
- var config PackageConfig
- err = toml.NewDecoder(file).Decode(&config)
- if err != nil {
- return PackageConfig{}, fmt.Errorf("failed to parse package config: %w", err)
- }
-
- return config, nil
-}
-
-func OverwritePackageConfig(path string, config PackageConfig) error {
- for i, dependency := range config.Dependencies {
- if !strings.HasPrefix(dependency.URI, "docker://") {
- config.Dependencies[i].URI = fmt.Sprintf("docker://%s", dependency.URI)
- }
- }
-
- file, err := os.OpenFile(path, os.O_RDWR|os.O_TRUNC, 0600)
- if err != nil {
- return fmt.Errorf("failed to open package config file: %w", err)
- }
-
- err = toml.NewEncoder(file).Encode(config)
- if err != nil {
- return fmt.Errorf("failed to write package config: %w", err)
- }
-
- return nil
-}
diff --git a/cargo/jam/internal/package_config_test.go b/cargo/jam/internal/package_config_test.go
deleted file mode 100644
index 0b0e967f..00000000
--- a/cargo/jam/internal/package_config_test.go
+++ /dev/null
@@ -1,185 +0,0 @@
-package internal_test
-
-import (
- "os"
- "testing"
-
- "github.com/paketo-buildpacks/packit/cargo/jam/internal"
- "github.com/sclevine/spec"
-
- . "github.com/onsi/gomega"
- . "github.com/paketo-buildpacks/packit/matchers"
-)
-
-func testPackageConfig(t *testing.T, context spec.G, it spec.S) {
- var (
- Expect = NewWithT(t).Expect
-
- path string
- )
-
- context("ParsePackageConfig", func() {
- it.Before(func() {
- file, err := os.CreateTemp("", "package.toml")
- Expect(err).NotTo(HaveOccurred())
- defer file.Close()
-
- _, err = file.WriteString(`
- [buildpack]
- uri = "build/buildpack.tgz"
-
- [[dependencies]]
- uri = "docker://some-registry/some-repository/last-buildpack-id:0.2.0"
-
- [[dependencies]]
- image = "some-registry/some-repository/some-buildpack-id:0.20.1"
-
- [[dependencies]]
- uri = "docker://some-registry/some-repository/other-buildpack-id:0.1.0"
- `)
- Expect(err).NotTo(HaveOccurred())
-
- path = file.Name()
- })
-
- it.After(func() {
- Expect(os.RemoveAll(path)).To(Succeed())
- })
-
- it("parses the package.toml configuration", func() {
- config, err := internal.ParsePackageConfig(path)
- Expect(err).NotTo(HaveOccurred())
- Expect(config).To(Equal(internal.PackageConfig{
- Buildpack: map[string]interface{}{
- "uri": "build/buildpack.tgz",
- },
- Dependencies: []internal.PackageConfigDependency{
- {URI: "some-registry/some-repository/last-buildpack-id:0.2.0"},
- {URI: "some-registry/some-repository/some-buildpack-id:0.20.1"},
- {URI: "some-registry/some-repository/other-buildpack-id:0.1.0"},
- },
- }))
- })
-
- context("failure cases", func() {
- context("when the file cannot be opened", func() {
- it.Before(func() {
- Expect(os.Remove(path)).To(Succeed())
- })
-
- it("returns an error", func() {
- _, err := internal.ParsePackageConfig(path)
- Expect(err).To(MatchError(ContainSubstring("failed to open package config file:")))
- Expect(err).To(MatchError(ContainSubstring("no such file or directory")))
- })
- })
-
- context("when the file contents cannot be parsed", func() {
- it.Before(func() {
- Expect(os.WriteFile(path, []byte("%%%"), 0600)).To(Succeed())
- })
-
- it("returns an error", func() {
- _, err := internal.ParsePackageConfig(path)
- Expect(err).To(MatchError(ContainSubstring("failed to parse package config:")))
- Expect(err).To(MatchError(ContainSubstring("keys cannot contain % character")))
- })
- })
-
- context("when a dependency uri is not valid", func() {
- it.Before(func() {
- Expect(os.WriteFile(path, []byte(`
- [buildpack]
- uri = "build/buildpack.tgz"
-
- [[dependencies]]
- uri = "docker://some-registry/some-repository/last-buildpack-id:0.2.0"
-
- [[dependencies]]
- image = "some-registry/some-repository/some-buildpack-id:0.20.1"
-
- [[dependencies]]
- uri = "%%%"
- `), 0600)).To(Succeed())
- })
-
- it("returns an error", func() {
- _, err := internal.ParsePackageConfig(path)
- Expect(err).To(MatchError(ContainSubstring("failed to parse package config:")))
- Expect(err).To(MatchError(ContainSubstring("invalid URL escape")))
- })
- })
- })
- })
-
- context("OverwritePackageConfig", func() {
- it.Before(func() {
- file, err := os.CreateTemp("", "package.toml")
- Expect(err).NotTo(HaveOccurred())
- defer file.Close()
-
- _, err = file.WriteString(`previous contents of the file`)
- Expect(err).NotTo(HaveOccurred())
-
- path = file.Name()
- })
-
- it.After(func() {
- Expect(os.RemoveAll(path)).To(Succeed())
- })
-
- it("overwrites the package.toml configuration", func() {
- err := internal.OverwritePackageConfig(path, internal.PackageConfig{
- Buildpack: map[string]interface{}{
- "uri": "build/buildpack.tgz",
- },
- Dependencies: []internal.PackageConfigDependency{
- {URI: "some-registry/some-repository/last-buildpack-id:0.2.0"},
- {URI: "some-registry/some-repository/some-buildpack-id:0.20.1"},
- {URI: "some-registry/some-repository/other-buildpack-id:0.1.0"},
- },
- })
- Expect(err).NotTo(HaveOccurred())
-
- contents, err := os.ReadFile(path)
- Expect(err).NotTo(HaveOccurred())
- Expect(string(contents)).To(MatchTOML(`
- [buildpack]
- uri = "build/buildpack.tgz"
-
- [[dependencies]]
- uri = "docker://some-registry/some-repository/last-buildpack-id:0.2.0"
-
- [[dependencies]]
- uri = "docker://some-registry/some-repository/some-buildpack-id:0.20.1"
-
- [[dependencies]]
- uri = "docker://some-registry/some-repository/other-buildpack-id:0.1.0"
- `))
- })
-
- context("failure cases", func() {
- context("when the file cannot be opened", func() {
- it.Before(func() {
- Expect(os.Remove(path)).To(Succeed())
- })
-
- it("returns an error", func() {
- err := internal.OverwritePackageConfig(path, internal.PackageConfig{})
- Expect(err).To(MatchError(ContainSubstring("failed to open package config file:")))
- Expect(err).To(MatchError(ContainSubstring("no such file or directory")))
- })
- })
-
- context("when the config cannot be written", func() {
- it("returns an error", func() {
- err := internal.OverwritePackageConfig(path, internal.PackageConfig{
- Buildpack: func() {},
- })
- Expect(err).To(MatchError(ContainSubstring("failed to write package config:")))
- Expect(err).To(MatchError(ContainSubstring("Marshal can't handle func()(func)")))
- })
- })
- })
- })
-}
diff --git a/cargo/jam/internal/pre_packager.go b/cargo/jam/internal/pre_packager.go
deleted file mode 100644
index 48bb28fe..00000000
--- a/cargo/jam/internal/pre_packager.go
+++ /dev/null
@@ -1,48 +0,0 @@
-package internal
-
-import (
- "io"
-
- "github.com/paketo-buildpacks/packit/pexec"
- "github.com/paketo-buildpacks/packit/scribe"
-)
-
-//go:generate faux --interface Executable --output fakes/executable.go
-type Executable interface {
- Execute(execution pexec.Execution) error
-}
-
-type PrePackager struct {
- executable Executable
- logger scribe.Logger
- output io.Writer
-}
-
-func NewPrePackager(executable Executable, logger scribe.Logger, output io.Writer) PrePackager {
- return PrePackager{
- executable: executable,
- logger: logger,
- output: output,
- }
-}
-
-func (p PrePackager) Execute(scriptPath, rootDir string) error {
- if scriptPath == "" {
- return nil
- }
-
- p.logger.Process("Executing pre-packaging script: %s", scriptPath)
-
- err := p.executable.Execute(pexec.Execution{
- Args: []string{"-c", scriptPath},
- Dir: rootDir,
- Stdout: p.output,
- Stderr: p.output,
- })
- if err != nil {
- return err
- }
-
- p.logger.Break()
- return nil
-}
diff --git a/cargo/jam/internal/pre_packager_test.go b/cargo/jam/internal/pre_packager_test.go
deleted file mode 100644
index e79ba28d..00000000
--- a/cargo/jam/internal/pre_packager_test.go
+++ /dev/null
@@ -1,65 +0,0 @@
-package internal_test
-
-import (
- "bytes"
- "fmt"
- "testing"
-
- "github.com/paketo-buildpacks/packit/cargo/jam/internal"
- "github.com/paketo-buildpacks/packit/cargo/jam/internal/fakes"
- "github.com/paketo-buildpacks/packit/pexec"
- "github.com/paketo-buildpacks/packit/scribe"
- "github.com/sclevine/spec"
-
- . "github.com/onsi/gomega"
-)
-
-func testPrePackager(t *testing.T, context spec.G, it spec.S) {
- var (
- Expect = NewWithT(t).Expect
-
- bash *fakes.Executable
- logger scribe.Logger
- output *bytes.Buffer
- prePackager internal.PrePackager
- )
-
- it.Before(func() {
- bash = &fakes.Executable{}
- bash.ExecuteCall.Stub = func(execution pexec.Execution) error {
- if execution.Stdout != nil {
- fmt.Fprint(execution.Stdout, "hello from stdout")
- }
-
- if execution.Stderr != nil {
- fmt.Fprint(execution.Stderr, "hello from stderr")
- }
-
- return nil
- }
-
- output = bytes.NewBuffer(nil)
- logger = scribe.NewLogger(output)
- prePackager = internal.NewPrePackager(bash, logger, output)
- })
-
- context("Execute", func() {
- it("executes the pre-package script", func() {
- err := prePackager.Execute("some-script", "some-dir")
- Expect(err).NotTo(HaveOccurred())
- Expect(bash.ExecuteCall.Receives.Execution.Args).To(Equal([]string{"-c", "some-script"}))
- Expect(bash.ExecuteCall.Receives.Execution.Dir).To(Equal("some-dir"))
-
- Expect(output.String()).To(ContainSubstring("Executing pre-packaging script: some-script"))
- Expect(output.String()).To(ContainSubstring("hello from stdout"))
- Expect(output.String()).To(ContainSubstring("hello from stderr"))
- })
-
- it("executes nothing when passed a empty script", func() {
- err := prePackager.Execute("", "some-dir")
- Expect(err).NotTo(HaveOccurred())
- Expect(bash.ExecuteCall.CallCount).To(Equal(0))
- Expect(output.String()).To(BeEmpty())
- })
- })
-}
diff --git a/cargo/jam/internal/tar_builder.go b/cargo/jam/internal/tar_builder.go
deleted file mode 100644
index fbbf81a0..00000000
--- a/cargo/jam/internal/tar_builder.go
+++ /dev/null
@@ -1,89 +0,0 @@
-package internal
-
-import (
- "archive/tar"
- "compress/gzip"
- "fmt"
- "io"
- "os"
- "path/filepath"
- "sort"
- "time"
-
- "github.com/paketo-buildpacks/packit/scribe"
-)
-
-type TarBuilder struct {
- logger scribe.Logger
-}
-
-func NewTarBuilder(logger scribe.Logger) TarBuilder {
- return TarBuilder{
- logger: logger,
- }
-}
-
-func (b TarBuilder) Build(path string, files []File) error {
- b.logger.Process("Building tarball: %s", path)
- file, err := os.OpenFile(path, os.O_CREATE|os.O_RDWR|os.O_TRUNC, 0644)
- if err != nil {
- return fmt.Errorf("failed to create tarball: %s", err)
- }
- defer file.Close()
-
- gw := gzip.NewWriter(file)
- defer gw.Close()
-
- tw := tar.NewWriter(gw)
- defer tw.Close()
-
- directories := map[string]struct{}{}
- for _, file := range files {
- path := filepath.Dir(file.Name)
- for path != "." {
- directories[path] = struct{}{}
-
- path = filepath.Dir(path)
- }
- }
-
- for dir := range directories {
- files = append(files, File{
- Name: dir,
- Info: NewFileInfo(filepath.Base(dir), 0, os.ModePerm|os.ModeDir, time.Now()),
- })
- }
-
- sort.Slice(files, func(i, j int) bool {
- return files[i].Name < files[j].Name
- })
-
- for _, file := range files {
- b.logger.Subprocess(file.Name)
-
- hdr, err := tar.FileInfoHeader(file.Info, file.Link)
- if err != nil {
- return fmt.Errorf("failed to create header for file %q: %w", file.Name, err)
- }
-
- hdr.Name = file.Name
-
- err = tw.WriteHeader(hdr)
- if err != nil {
- return fmt.Errorf("failed to write header to tarball: %w", err)
- }
-
- if file.ReadCloser != nil {
- _, err = io.Copy(tw, file)
- if err != nil {
- return fmt.Errorf("failed to write file to tarball: %w", err)
- }
-
- file.Close()
- }
- }
-
- b.logger.Break()
-
- return nil
-}
diff --git a/cargo/jam/internal/tar_builder_test.go b/cargo/jam/internal/tar_builder_test.go
deleted file mode 100644
index d43f3e3a..00000000
--- a/cargo/jam/internal/tar_builder_test.go
+++ /dev/null
@@ -1,162 +0,0 @@
-package internal_test
-
-import (
- "archive/tar"
- "bytes"
- "fmt"
- "io"
- "os"
- "path/filepath"
- "strings"
- "testing"
- "time"
-
- "github.com/paketo-buildpacks/packit/cargo/jam/internal"
- "github.com/paketo-buildpacks/packit/scribe"
- "github.com/sclevine/spec"
-
- . "github.com/onsi/gomega"
-)
-
-func testTarBuilder(t *testing.T, context spec.G, it spec.S) {
- var (
- Expect = NewWithT(t).Expect
-
- tempFile string
- tempDir string
- output *bytes.Buffer
- builder internal.TarBuilder
- )
-
- it.Before(func() {
- var err error
- tempDir, err = os.MkdirTemp("", "output")
- Expect(err).NotTo(HaveOccurred())
-
- tempFile = filepath.Join(tempDir, "buildpack.tgz")
-
- output = bytes.NewBuffer(nil)
- builder = internal.NewTarBuilder(scribe.NewLogger(output))
- })
-
- it.After(func() {
- Expect(os.RemoveAll(tempDir)).To(Succeed())
- })
-
- context("Build", func() {
- context("given a destination and a list of files", func() {
- it("constructs a tarball", func() {
- err := builder.Build(tempFile, []internal.File{
- {
- Name: "buildpack.toml",
- Info: internal.NewFileInfo("buildpack.toml", len("buildpack-toml-contents"), 0644, time.Now()),
- ReadCloser: io.NopCloser(strings.NewReader("buildpack-toml-contents")),
- },
- {
- Name: "bin/build",
- Info: internal.NewFileInfo("build", len("build-contents"), 0755, time.Now()),
- ReadCloser: io.NopCloser(strings.NewReader("build-contents")),
- },
- {
- Name: "bin/detect",
- Info: internal.NewFileInfo("detect", len("detect-contents"), 0755, time.Now()),
- ReadCloser: io.NopCloser(strings.NewReader("detect-contents")),
- },
- {
- Name: "bin/link",
- Info: internal.NewFileInfo("link", len("./build"), os.ModeSymlink|0755, time.Now()),
- Link: "./build",
- },
- })
- Expect(err).NotTo(HaveOccurred())
-
- Expect(output.String()).To(ContainSubstring(fmt.Sprintf("Building tarball: %s", tempFile)))
- Expect(output.String()).To(ContainSubstring("bin/build"))
- Expect(output.String()).To(ContainSubstring("bin/detect"))
- Expect(output.String()).To(ContainSubstring("bin/link"))
- Expect(output.String()).To(ContainSubstring("buildpack.toml"))
-
- file, err := os.Open(tempFile)
- Expect(err).NotTo(HaveOccurred())
-
- contents, hdr, err := ExtractFile(file, "buildpack.toml")
- Expect(err).NotTo(HaveOccurred())
- Expect(string(contents)).To(Equal("buildpack-toml-contents"))
- Expect(hdr.Mode).To(Equal(int64(0644)))
-
- contents, hdr, err = ExtractFile(file, "bin")
- Expect(err).NotTo(HaveOccurred())
- Expect(string(contents)).To(BeEmpty())
- Expect(hdr.Mode).To(Equal(int64(0777)))
- Expect(hdr.Typeflag).To(Equal(uint8(tar.TypeDir)))
-
- contents, hdr, err = ExtractFile(file, "bin/build")
- Expect(err).NotTo(HaveOccurred())
- Expect(string(contents)).To(Equal("build-contents"))
- Expect(hdr.Mode).To(Equal(int64(0755)))
-
- contents, hdr, err = ExtractFile(file, "bin/detect")
- Expect(err).NotTo(HaveOccurred())
- Expect(string(contents)).To(Equal("detect-contents"))
- Expect(hdr.Mode).To(Equal(int64(0755)))
-
- _, hdr, err = ExtractFile(file, "bin/link")
- Expect(err).NotTo(HaveOccurred())
- Expect(hdr.Typeflag).To(Equal(byte(tar.TypeSymlink)))
- Expect(hdr.Linkname).To(Equal("./build"))
- Expect(hdr.Mode).To(Equal(int64(0755)))
- })
- })
-
- context("failure cases", func() {
- context("when it is unable to create the destination file", func() {
- it.Before(func() {
- Expect(os.Chmod(tempDir, 0000)).To(Succeed())
- })
-
- it.Before(func() {
- Expect(os.Chmod(tempDir, 0644)).To(Succeed())
- })
-
- it("returns an error", func() {
- err := builder.Build(tempFile, []internal.File{
- {
- Name: "bin/build",
- Info: internal.NewFileInfo("build", len("build-contents"), 0755, time.Now()),
- ReadCloser: io.NopCloser(strings.NewReader("build-contents")),
- },
- })
- Expect(err).To(MatchError(ContainSubstring("failed to create tarball")))
- Expect(err).To(MatchError(ContainSubstring("permission denied")))
- })
- })
-
- context("when one of the files cannot be written", func() {
- it("returns an error", func() {
- err := builder.Build(tempFile, []internal.File{
- {
- Name: "bin/build",
- Info: internal.NewFileInfo("build", 1, 0755, time.Now()),
- ReadCloser: io.NopCloser(strings.NewReader("build-contents")),
- },
- })
- Expect(err).To(MatchError(ContainSubstring("failed to write file to tarball")))
- Expect(err).To(MatchError(ContainSubstring("write too long")))
- })
- })
-
- context("when one of the files cannot have its header created", func() {
- it("returns an error", func() {
- err := builder.Build(tempFile, []internal.File{
- {
- Name: "bin/build",
- ReadCloser: io.NopCloser(strings.NewReader("build-contents")),
- },
- })
- Expect(err).To(MatchError(ContainSubstring("failed to create header for file \"bin/build\":")))
- Expect(err).To(MatchError(ContainSubstring("FileInfo is nil")))
- })
- })
- })
- })
-}
diff --git a/cargo/jam/main.go b/cargo/jam/main.go
deleted file mode 100644
index f7ba59e6..00000000
--- a/cargo/jam/main.go
+++ /dev/null
@@ -1,16 +0,0 @@
-package main
-
-import (
- "fmt"
- "os"
-
- "github.com/paketo-buildpacks/packit/cargo/jam/commands"
-)
-
-func main() {
- err := commands.Execute()
- if err != nil {
- fmt.Fprintf(os.Stderr, "failed to execute: %s", err)
- os.Exit(1)
- }
-}
diff --git a/cargo/jam/pack_test.go b/cargo/jam/pack_test.go
deleted file mode 100644
index 99ddc3eb..00000000
--- a/cargo/jam/pack_test.go
+++ /dev/null
@@ -1,399 +0,0 @@
-package main_test
-
-import (
- "fmt"
- "net/http"
- "net/http/httptest"
- "os"
- "os/exec"
- "os/user"
- "path/filepath"
- "testing"
-
- "github.com/onsi/gomega/gbytes"
- "github.com/onsi/gomega/gexec"
- "github.com/paketo-buildpacks/packit/cargo"
- "github.com/sclevine/spec"
-
- . "github.com/onsi/gomega"
- . "github.com/paketo-buildpacks/packit/matchers"
-)
-
-func testPack(t *testing.T, context spec.G, it spec.S) {
- var (
- withT = NewWithT(t)
- Expect = withT.Expect
- Eventually = withT.Eventually
-
- buffer *Buffer
- tmpDir string
- buildpackDir string
- )
-
- it.Before(func() {
- var err error
- tmpDir, err = os.MkdirTemp("", "output")
- Expect(err).NotTo(HaveOccurred())
-
- buildpackDir, err = os.MkdirTemp("", "buildpack")
- Expect(err).NotTo(HaveOccurred())
-
- buffer = &Buffer{}
- })
-
- it.After(func() {
- Expect(os.RemoveAll(tmpDir)).To(Succeed())
- Expect(os.RemoveAll(buildpackDir)).To(Succeed())
- })
-
- context("when packaging a language family buildpack", func() {
-
- it.Before(func() {
- err := cargo.NewDirectoryDuplicator().Duplicate(filepath.Join("testdata", "example-language-family-cnb"), buildpackDir)
- Expect(err).NotTo(HaveOccurred())
- })
-
- it("creates a language family archive", func() {
- command := exec.Command(
- path, "pack",
- "--buildpack", filepath.Join(buildpackDir, "buildpack.toml"),
- "--output", filepath.Join(tmpDir, "output.tgz"),
- "--version", "some-version",
- )
- session, err := gexec.Start(command, buffer, buffer)
- Expect(err).NotTo(HaveOccurred())
- Eventually(session, "5s").Should(gexec.Exit(0), func() string { return buffer.String() })
-
- Expect(session.Out).To(gbytes.Say("Packing some-buildpack-name some-version..."))
- Expect(session.Out).To(gbytes.Say(fmt.Sprintf(" Building tarball: %s", filepath.Join(tmpDir, "output.tgz"))))
- Expect(session.Out).To(gbytes.Say(" buildpack.toml"))
-
- file, err := os.Open(filepath.Join(tmpDir, "output.tgz"))
- Expect(err).NotTo(HaveOccurred())
-
- contents, _, err := ExtractFile(file, "buildpack.toml")
- Expect(err).NotTo(HaveOccurred())
- Expect(contents).To(MatchTOML(`api = "0.2"
-
-[buildpack]
- id = "some-buildpack-id"
- name = "some-buildpack-name"
- version = "some-version"
-
-[metadata]
- include-files = ["buildpack.toml"]
-
- [[metadata.dependencies]]
- deprecation_date = "2019-04-01T00:00:00Z"
- id = "some-dependency"
- name = "Some Dependency"
- sha256 = "shasum"
- stacks = ["io.buildpacks.stacks.bionic", "org.cloudfoundry.stacks.tiny"]
- uri = "http://some-url"
- version = "1.2.3"
-
- [[metadata.dependencies]]
- deprecation_date = "2022-04-01T00:00:00Z"
- id = "other-dependency"
- name = "Other Dependency"
- sha256 = "shasum"
- stacks = ["org.cloudfoundry.stacks.tiny"]
- uri = "http://other-url"
- version = "4.5.6"
-
-[[order]]
- [[order.group]]
- id = "some-dependency"
- version = "1.2.3"
-
- [[order.group]]
- id = "other-dependency"
- version = "4.5.6"`))
- })
- })
-
- context("when packaging an implementation buildpack", func() {
- it.Before(func() {
- err := cargo.NewDirectoryDuplicator().Duplicate(filepath.Join("testdata", "example-cnb"), buildpackDir)
- Expect(err).NotTo(HaveOccurred())
- })
-
- it("creates a packaged buildpack", func() {
- command := exec.Command(
- path, "pack",
- "--buildpack", filepath.Join(buildpackDir, "buildpack.toml"),
- "--output", filepath.Join(tmpDir, "output.tgz"),
- "--version", "some-version",
- )
- session, err := gexec.Start(command, buffer, buffer)
- Expect(err).NotTo(HaveOccurred())
- Eventually(session, "5s").Should(gexec.Exit(0), func() string { return buffer.String() })
-
- Expect(session.Out).To(gbytes.Say("Packing some-buildpack-name some-version..."))
- Expect(session.Out).To(gbytes.Say(" Executing pre-packaging script: ./scripts/build.sh"))
- Expect(session.Out).To(gbytes.Say(" hello from the pre-packaging script"))
- Expect(session.Out).To(gbytes.Say(fmt.Sprintf(" Building tarball: %s", filepath.Join(tmpDir, "output.tgz"))))
- Expect(session.Out).To(gbytes.Say(" bin/build"))
- Expect(session.Out).To(gbytes.Say(" bin/detect"))
- Expect(session.Out).To(gbytes.Say(" bin/link"))
- Expect(session.Out).To(gbytes.Say(" buildpack.toml"))
- Expect(session.Out).To(gbytes.Say(" generated-file"))
-
- file, err := os.Open(filepath.Join(tmpDir, "output.tgz"))
- Expect(err).NotTo(HaveOccurred())
-
- u, err := user.Current()
- Expect(err).NotTo(HaveOccurred())
- userName := u.Username
-
- group, err := user.LookupGroupId(u.Gid)
- Expect(err).NotTo(HaveOccurred())
- groupName := group.Name
-
- contents, hdr, err := ExtractFile(file, "buildpack.toml")
- Expect(err).NotTo(HaveOccurred())
- Expect(contents).To(MatchTOML(`api = "0.2"
-
-[buildpack]
- id = "some-buildpack-id"
- name = "some-buildpack-name"
- version = "some-version"
- homepage = "some-homepage-link"
-
-[metadata]
- include-files = ["bin/build", "bin/detect", "bin/link", "buildpack.toml", "generated-file"]
- pre-package = "./scripts/build.sh"
- [metadata.default-versions]
- some-dependency = "some-default-version"
-
- [[metadata.dependencies]]
- deprecation_date = "2019-04-01T00:00:00Z"
- id = "some-dependency"
- name = "Some Dependency"
- sha256 = "shasum"
- stacks = ["io.buildpacks.stacks.bionic", "org.cloudfoundry.stacks.tiny"]
- uri = "http://some-url"
- version = "1.2.3"
-
- [[metadata.dependencies]]
- deprecation_date = "2022-04-01T00:00:00Z"
- id = "other-dependency"
- name = "Other Dependency"
- sha256 = "shasum"
- stacks = ["org.cloudfoundry.stacks.tiny"]
- uri = "http://other-url"
- version = "4.5.6"
-
-[[stacks]]
- id = "some-stack-id"
- mixins = ["some-mixin-id"]`))
- Expect(hdr.Mode).To(Equal(int64(0644)))
-
- contents, hdr, err = ExtractFile(file, "bin/build")
- Expect(err).NotTo(HaveOccurred())
- Expect(string(contents)).To(Equal("build-contents"))
- Expect(hdr.Mode).To(Equal(int64(0755)))
- Expect(hdr.Uname).To(Equal(userName))
- Expect(hdr.Gname).To(Equal(groupName))
-
- contents, hdr, err = ExtractFile(file, "bin/detect")
- Expect(err).NotTo(HaveOccurred())
- Expect(string(contents)).To(Equal("detect-contents"))
- Expect(hdr.Mode).To(Equal(int64(0755)))
- Expect(hdr.Uname).To(Equal(userName))
- Expect(hdr.Gname).To(Equal(groupName))
-
- _, hdr, err = ExtractFile(file, "bin/link")
- Expect(err).NotTo(HaveOccurred())
- Expect(hdr.Linkname).To(Equal("build"))
- Expect(hdr.Uname).To(Equal(userName))
- Expect(hdr.Gname).To(Equal(groupName))
-
- contents, hdr, err = ExtractFile(file, "generated-file")
- Expect(err).NotTo(HaveOccurred())
- Expect(string(contents)).To(Equal("hello\n"))
- Expect(hdr.Mode).To(Equal(int64(0644)))
- Expect(hdr.Uname).To(Equal(userName))
- Expect(hdr.Gname).To(Equal(groupName))
-
- Expect(filepath.Join(buildpackDir, "generated-file")).NotTo(BeARegularFile())
- })
-
- context("when the buildpack is built to run offline", func() {
- var server *httptest.Server
- it.Before(func() {
- server = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
- if req.URL.Path != "/some-dependency.tgz" {
- http.NotFound(w, req)
- }
-
- fmt.Fprint(w, "dependency-contents")
- }))
-
- config, err := cargo.NewBuildpackParser().Parse(filepath.Join(buildpackDir, "buildpack.toml"))
- Expect(err).NotTo(HaveOccurred())
- Expect(config.Metadata.Dependencies).To(HaveLen(2))
-
- config.Metadata.Dependencies[0].URI = fmt.Sprintf("%s/some-dependency.tgz", server.URL)
- config.Metadata.Dependencies[0].SHA256 = "f058c8bf6b65b829e200ef5c2d22fde0ee65b96c1fbd1b88869be133aafab64a"
-
- bpTomlWriter, err := os.Create(filepath.Join(buildpackDir, "buildpack.toml"))
- Expect(err).NotTo(HaveOccurred())
-
- Expect(cargo.EncodeConfig(bpTomlWriter, config)).To(Succeed())
- })
-
- it.After(func() {
- server.Close()
- })
-
- it("creates an offline packaged buildpack", func() {
- command := exec.Command(
- path, "pack",
- "--buildpack", filepath.Join(buildpackDir, "buildpack.toml"),
- "--output", filepath.Join(tmpDir, "output.tgz"),
- "--version", "some-version",
- "--offline",
- "--stack", "io.buildpacks.stacks.bionic",
- )
- session, err := gexec.Start(command, buffer, buffer)
- Expect(err).NotTo(HaveOccurred())
- Eventually(session).Should(gexec.Exit(0), func() string { return buffer.String() })
-
- Expect(session.Out).To(gbytes.Say("Packing some-buildpack-name some-version..."))
- Expect(session.Out).To(gbytes.Say(" Executing pre-packaging script: ./scripts/build.sh"))
- Expect(session.Out).To(gbytes.Say(" hello from the pre-packaging script"))
- Expect(session.Out).To(gbytes.Say(" Downloading dependencies..."))
- Expect(session.Out).To(gbytes.Say(` some-dependency \(1.2.3\) \[io.buildpacks.stacks.bionic, org.cloudfoundry.stacks.tiny\]`))
- Expect(session.Out).To(gbytes.Say(" ↳ dependencies/f058c8bf6b65b829e200ef5c2d22fde0ee65b96c1fbd1b88869be133aafab64a"))
- Expect(session.Out).To(gbytes.Say(fmt.Sprintf(" Building tarball: %s", filepath.Join(tmpDir, "output.tgz"))))
- Expect(session.Out).To(gbytes.Say(" bin"))
- Expect(session.Out).To(gbytes.Say(" bin/build"))
- Expect(session.Out).To(gbytes.Say(" bin/detect"))
- Expect(session.Out).To(gbytes.Say(" buildpack.toml"))
- Expect(session.Out).To(gbytes.Say(" dependencies"))
- Expect(session.Out).To(gbytes.Say(" dependencies/f058c8bf6b65b829e200ef5c2d22fde0ee65b96c1fbd1b88869be133aafab64a"))
- Expect(session.Out).To(gbytes.Say(" generated-file"))
-
- Expect(string(session.Out.Contents())).NotTo(ContainSubstring("other-dependency"))
-
- file, err := os.Open(filepath.Join(tmpDir, "output.tgz"))
- Expect(err).NotTo(HaveOccurred())
-
- contents, hdr, err := ExtractFile(file, "buildpack.toml")
- Expect(err).NotTo(HaveOccurred())
- Expect(contents).To(MatchTOML(`api = "0.2"
-
-[buildpack]
- id = "some-buildpack-id"
- name = "some-buildpack-name"
- version = "some-version"
- homepage = "some-homepage-link"
-
-[metadata]
- include-files = ["bin/build", "bin/detect", "bin/link", "buildpack.toml", "generated-file", "dependencies/f058c8bf6b65b829e200ef5c2d22fde0ee65b96c1fbd1b88869be133aafab64a"]
- pre-package = "./scripts/build.sh"
- [metadata.default-versions]
- some-dependency = "some-default-version"
-
- [[metadata.dependencies]]
- deprecation_date = "2019-04-01T00:00:00Z"
- id = "some-dependency"
- name = "Some Dependency"
- sha256 = "f058c8bf6b65b829e200ef5c2d22fde0ee65b96c1fbd1b88869be133aafab64a"
- stacks = ["io.buildpacks.stacks.bionic", "org.cloudfoundry.stacks.tiny"]
- uri = "file:///dependencies/f058c8bf6b65b829e200ef5c2d22fde0ee65b96c1fbd1b88869be133aafab64a"
- version = "1.2.3"
-
-[[stacks]]
- id = "some-stack-id"
- mixins = ["some-mixin-id"]`))
- Expect(hdr.Mode).To(Equal(int64(0644)))
-
- contents, hdr, err = ExtractFile(file, "bin/build")
- Expect(err).NotTo(HaveOccurred())
- Expect(string(contents)).To(Equal("build-contents"))
- Expect(hdr.Mode).To(Equal(int64(0755)))
-
- contents, hdr, err = ExtractFile(file, "bin/detect")
- Expect(err).NotTo(HaveOccurred())
- Expect(string(contents)).To(Equal("detect-contents"))
- Expect(hdr.Mode).To(Equal(int64(0755)))
-
- contents, hdr, err = ExtractFile(file, "generated-file")
- Expect(err).NotTo(HaveOccurred())
- Expect(string(contents)).To(Equal("hello\n"))
- Expect(hdr.Mode).To(Equal(int64(0644)))
-
- contents, hdr, err = ExtractFile(file, "dependencies/f058c8bf6b65b829e200ef5c2d22fde0ee65b96c1fbd1b88869be133aafab64a")
- Expect(err).NotTo(HaveOccurred())
- Expect(string(contents)).To(Equal("dependency-contents"))
- Expect(hdr.Mode).To(Equal(int64(0644)))
- })
- })
- })
-
- context("failure cases", func() {
- context("when the all the required flags are not set", func() {
- it("prints an error message", func() {
- command := exec.Command(path, "pack")
- session, err := gexec.Start(command, buffer, buffer)
- Expect(err).NotTo(HaveOccurred())
- Eventually(session).Should(gexec.Exit(1), func() string { return buffer.String() })
-
- Expect(session.Err.Contents()).To(ContainSubstring("Error: required flag(s) \"buildpack\", \"output\", \"version\" not set"))
- })
- })
-
- context("when the required buildpack flag is not set", func() {
- it("prints an error message", func() {
- command := exec.Command(
- path, "pack",
- "--output", filepath.Join(tmpDir, "output.tgz"),
- "--version", "some-version",
- "--offline",
- "--stack", "io.buildpacks.stacks.bionic",
- )
- session, err := gexec.Start(command, buffer, buffer)
- Expect(err).NotTo(HaveOccurred())
- Eventually(session).Should(gexec.Exit(1), func() string { return buffer.String() })
-
- Expect(session.Err.Contents()).To(ContainSubstring("Error: required flag(s) \"buildpack\" not set"))
- })
- })
-
- context("when the required output flag is not set", func() {
- it("prints an error message", func() {
- command := exec.Command(
- path, "pack",
- "--buildpack", filepath.Join(buildpackDir, "buildpack.toml"),
- "--version", "some-version",
- "--offline",
- "--stack", "io.buildpacks.stacks.bionic",
- )
- session, err := gexec.Start(command, buffer, buffer)
- Expect(err).NotTo(HaveOccurred())
- Eventually(session).Should(gexec.Exit(1), func() string { return buffer.String() })
-
- Expect(session.Err.Contents()).To(ContainSubstring("Error: required flag(s) \"output\" not set"))
- })
- })
-
- context("when the required version flag is not set", func() {
- it("prints an error message", func() {
- command := exec.Command(
- path, "pack",
- "--buildpack", filepath.Join(buildpackDir, "buildpack.toml"),
- "--output", filepath.Join(tmpDir, "output.tgz"),
- "--offline",
- "--stack", "io.buildpacks.stacks.bionic",
- )
- session, err := gexec.Start(command, buffer, buffer)
- Expect(err).NotTo(HaveOccurred())
- Eventually(session).Should(gexec.Exit(1), func() string { return buffer.String() })
-
- Expect(session.Err.Contents()).To(ContainSubstring("Error: required flag(s) \"version\" not set"))
- })
- })
- })
-}
diff --git a/cargo/jam/summarize_test.go b/cargo/jam/summarize_test.go
deleted file mode 100644
index c0e837c8..00000000
--- a/cargo/jam/summarize_test.go
+++ /dev/null
@@ -1,449 +0,0 @@
-package main_test
-
-import (
- "archive/tar"
- "bytes"
- "compress/gzip"
- "encoding/json"
- "os"
- "os/exec"
- "testing"
-
- "github.com/onsi/gomega/gexec"
- "github.com/sclevine/spec"
-
- . "github.com/onsi/gomega"
-)
-
-func testSummarize(t *testing.T, context spec.G, it spec.S) {
- var (
- withT = NewWithT(t)
- Expect = withT.Expect
- Eventually = withT.Eventually
-
- buildpackage string
- buffer *bytes.Buffer
- )
-
- it.Before(func() {
- file, err := os.CreateTemp("", "buildpackage")
- Expect(err).NotTo(HaveOccurred())
-
- tw := tar.NewWriter(file)
-
- firstBuildpack := bytes.NewBuffer(nil)
- firstBuildpackGW := gzip.NewWriter(firstBuildpack)
- firstBuildpackTW := tar.NewWriter(firstBuildpackGW)
-
- content := []byte(`[buildpack]
-id = "some-buildpack"
-name = "Some Buildpack"
-version = "1.2.3"
-
-[metadata.default-versions]
-some-dependency = "1.2.x"
-other-dependency = "2.3.x"
-
-[[metadata.dependencies]]
- id = "some-dependency"
- stacks = ["some-stack"]
- version = "1.2.3"
- sha256 = "some-sha"
-
-[[metadata.dependencies]]
- id = "other-dependency"
- stacks = ["other-stack"]
- version = "2.3.4"
- sha256 = "other-sha"
-
-[[stacks]]
- id = "some-stack"
-
-[[stacks]]
- id = "other-stack"
-`)
-
- err = firstBuildpackTW.WriteHeader(&tar.Header{
- Name: "./buildpack.toml",
- Mode: 0644,
- Size: int64(len(content)),
- })
- Expect(err).NotTo(HaveOccurred())
-
- _, err = firstBuildpackTW.Write(content)
- Expect(err).NotTo(HaveOccurred())
-
- Expect(firstBuildpackTW.Close()).To(Succeed())
- Expect(firstBuildpackGW.Close()).To(Succeed())
-
- err = tw.WriteHeader(&tar.Header{
- Name: "blobs/sha256/first-buildpack-sha",
- Mode: 0644,
- Size: int64(firstBuildpack.Len()),
- })
- Expect(err).NotTo(HaveOccurred())
-
- _, err = tw.Write(firstBuildpack.Bytes())
- Expect(err).NotTo(HaveOccurred())
-
- secondBuildpack := bytes.NewBuffer(nil)
- secondBuildpackGW := gzip.NewWriter(secondBuildpack)
- secondBuildpackTW := tar.NewWriter(secondBuildpackGW)
-
- content = []byte(`[buildpack]
-id = "other-buildpack"
-name = "Other Buildpack"
-version = "2.3.4"
-
-[metadata.default-versions]
-first-dependency = "4.5.x"
-second-dependency = "5.6.x"
-
-[[metadata.dependencies]]
- id = "first-dependency"
- stacks = ["first-stack"]
- version = "4.5.6"
- sha256 = "first-sha"
-
-[[metadata.dependencies]]
- id = "second-dependency"
- stacks = ["second-stack"]
- version = "5.6.7"
- sha256 = "second-sha"
-
-[[stacks]]
- id = "first-stack"
-
-[[stacks]]
- id = "second-stack"
-`)
-
- err = secondBuildpackTW.WriteHeader(&tar.Header{
- Name: "./buildpack.toml",
- Mode: 0644,
- Size: int64(len(content)),
- })
- Expect(err).NotTo(HaveOccurred())
-
- _, err = secondBuildpackTW.Write(content)
- Expect(err).NotTo(HaveOccurred())
-
- Expect(secondBuildpackTW.Close()).To(Succeed())
- Expect(secondBuildpackGW.Close()).To(Succeed())
-
- err = tw.WriteHeader(&tar.Header{
- Name: "blobs/sha256/second-buildpack-sha",
- Mode: 0644,
- Size: int64(secondBuildpack.Len()),
- })
- Expect(err).NotTo(HaveOccurred())
-
- _, err = tw.Write(secondBuildpack.Bytes())
- Expect(err).NotTo(HaveOccurred())
-
- metaBuildpack := bytes.NewBuffer(nil)
- metaBuildpackGW := gzip.NewWriter(metaBuildpack)
- metaBuildpackTW := tar.NewWriter(metaBuildpackGW)
-
- content = []byte(`[buildpack]
-id = "meta-buildpack"
-name = "Meta Buildpack"
-version = "3.4.5"
-
-[[order]]
- [[order.group]]
- id = "some-buildpack"
- version = "1.2.3"
-
- [[order.group]]
- id = "other-buildpack"
- version = "2.3.4"
-`)
-
- err = metaBuildpackTW.WriteHeader(&tar.Header{
- Name: "./buildpack.toml",
- Mode: 0644,
- Size: int64(len(content)),
- })
- Expect(err).NotTo(HaveOccurred())
-
- _, err = metaBuildpackTW.Write(content)
- Expect(err).NotTo(HaveOccurred())
-
- Expect(metaBuildpackTW.Close()).To(Succeed())
- Expect(metaBuildpackGW.Close()).To(Succeed())
-
- err = tw.WriteHeader(&tar.Header{
- Name: "blobs/sha256/meta-buildpack-sha",
- Mode: 0644,
- Size: int64(metaBuildpack.Len()),
- })
- Expect(err).NotTo(HaveOccurred())
-
- _, err = tw.Write(metaBuildpack.Bytes())
- Expect(err).NotTo(HaveOccurred())
-
- manifest := bytes.NewBuffer(nil)
- err = json.NewEncoder(manifest).Encode(map[string]interface{}{
- "layers": []map[string]interface{}{
- {"digest": "sha256:first-buildpack-sha"},
- {"digest": "sha256:second-buildpack-sha"},
- {"digest": "sha256:meta-buildpack-sha"},
- },
- })
- Expect(err).NotTo(HaveOccurred())
-
- err = tw.WriteHeader(&tar.Header{
- Name: "blobs/sha256/manifest-sha",
- Mode: 0644,
- Size: int64(manifest.Len()),
- })
- Expect(err).NotTo(HaveOccurred())
-
- _, err = tw.Write(manifest.Bytes())
- Expect(err).NotTo(HaveOccurred())
-
- index := bytes.NewBuffer(nil)
- err = json.NewEncoder(index).Encode(map[string]interface{}{
- "manifests": []map[string]interface{}{
- {"digest": "sha256:manifest-sha"},
- },
- })
- Expect(err).NotTo(HaveOccurred())
-
- err = tw.WriteHeader(&tar.Header{
- Name: "index.json",
- Mode: 0644,
- Size: int64(index.Len()),
- })
- Expect(err).NotTo(HaveOccurred())
-
- _, err = tw.Write(index.Bytes())
- Expect(err).NotTo(HaveOccurred())
-
- buildpackage = file.Name()
-
- Expect(tw.Close()).To(Succeed())
- Expect(file.Close()).To(Succeed())
-
- buffer = bytes.NewBuffer(nil)
- })
-
- it.After(func() {
- Expect(os.Remove(buildpackage)).To(Succeed())
- })
-
- context("when the format is set to markdown", func() {
- it("prints out the summary of a buildpack tarball", func() {
- command := exec.Command(
- path, "summarize",
- "--buildpack", buildpackage,
- "--format", "markdown",
- )
- session, err := gexec.Start(command, buffer, buffer)
- Expect(err).NotTo(HaveOccurred())
- Eventually(session).Should(gexec.Exit(0), func() string { return buffer.String() })
-
- Expect(string(session.Out.Contents())).To(Equal(`## Meta Buildpack 3.4.5` +
-
- "\n\n**ID:** `meta-buildpack`\n\n" +
-
- "**Digest:** `sha256:manifest-sha`" +
- `
-
-#### Included Buildpackages:
-| Name | ID | Version |
-|---|---|---|
-| Some Buildpack | some-buildpack | 1.2.3 |
-| Other Buildpack | other-buildpack | 2.3.4 |
-
-
-Order Groupings
-
-| ID | Version | Optional |
-|---|---|---|
-| some-buildpack | 1.2.3 | false |
-| other-buildpack | 2.3.4 | false |
-
-
-
----
-
-
-Some Buildpack 1.2.3
` +
-
- "\n\n**ID:** `some-buildpack`\n\n" +
-
- `#### Supported Stacks:
-- other-stack
-- some-stack
-
-#### Default Dependency Versions:
-| ID | Version |
-|---|---|
-| other-dependency | 2.3.x |
-| some-dependency | 1.2.x |
-
-#### Dependencies:
-| Name | Version | SHA256 |
-|---|---|---|
-| other-dependency | 2.3.4 | other-sha |
-| some-dependency | 1.2.3 | some-sha |
-
----
-
-
-
-
-Other Buildpack 2.3.4
` +
-
- "\n\n**ID:** `other-buildpack`\n\n" +
-
- `#### Supported Stacks:
-- first-stack
-- second-stack
-
-#### Default Dependency Versions:
-| ID | Version |
-|---|---|
-| first-dependency | 4.5.x |
-| second-dependency | 5.6.x |
-
-#### Dependencies:
-| Name | Version | SHA256 |
-|---|---|---|
-| first-dependency | 4.5.6 | first-sha |
-| second-dependency | 5.6.7 | second-sha |
-
----
-
-
-`))
- })
- })
-
- context("when the format is set to json", func() {
- it("prints out the summary of a buildpack tarball", func() {
- command := exec.Command(
- path, "summarize",
- "--buildpack", buildpackage,
- "--format", "json",
- )
- session, err := gexec.Start(command, buffer, buffer)
- Expect(err).NotTo(HaveOccurred())
- Eventually(session).Should(gexec.Exit(0), func() string { return buffer.String() })
-
- Expect(buffer.String()).To(MatchJSON(`{
- "buildpackage": {
- "buildpack": {
- "id": "meta-buildpack",
- "name": "Meta Buildpack",
- "version": "3.4.5"
- },
- "metadata": {},
- "order": [{
- "group": [{
- "id": "some-buildpack",
- "version": "1.2.3"
- },
- {
- "id": "other-buildpack",
- "version": "2.3.4"
- }
- ]
- }]
- },
- "children": [{
- "buildpack": {
- "id": "some-buildpack",
- "name": "Some Buildpack",
- "version": "1.2.3"
- },
- "metadata": {
- "default-versions": {
- "some-dependency": "1.2.x",
- "other-dependency": "2.3.x"
- },
- "dependencies": [{
- "id": "some-dependency",
- "stacks": [
- "some-stack"
- ],
- "version": "1.2.3",
- "sha256": "some-sha"
-
- },
- {
- "id": "other-dependency",
- "stacks": [
- "other-stack"
- ],
- "version": "2.3.4",
- "sha256": "other-sha"
- }
- ]
- },
- "stacks": [{
- "id": "some-stack"
- },
- {
- "id": "other-stack"
- }]
- },
- {
- "buildpack": {
- "id": "other-buildpack",
- "name": "Other Buildpack",
- "version": "2.3.4"
- },
- "metadata": {
- "default-versions": {
- "first-dependency": "4.5.x",
- "second-dependency": "5.6.x"
- },
- "dependencies": [{
- "id": "first-dependency",
- "stacks": [
- "first-stack"
- ],
- "version": "4.5.6",
- "sha256": "first-sha"
- },
- {
- "id": "second-dependency",
- "stacks": [
- "second-stack"
- ],
- "version": "5.6.7",
- "sha256": "second-sha"
- }
- ]
- },
- "stacks": [{
- "id": "first-stack"
- },
- {
- "id": "second-stack"
- }]
- }
- ]
- }`))
- })
- })
-
- context("failure cases", func() {
- context("when the required buildpack flag is not set", func() {
- it("prints an error message", func() {
- command := exec.Command(
- path, "summarize",
- "--format", "markdown",
- )
- session, err := gexec.Start(command, buffer, buffer)
- Expect(err).NotTo(HaveOccurred())
- Eventually(session).Should(gexec.Exit(1), func() string { return buffer.String() })
-
- Expect(session.Err.Contents()).To(ContainSubstring("Error: required flag(s) \"buildpack\" not set"))
- })
- })
- })
-}
diff --git a/cargo/jam/testdata/example-cnb/bin/build b/cargo/jam/testdata/example-cnb/bin/build
deleted file mode 100755
index c76df1a2..00000000
--- a/cargo/jam/testdata/example-cnb/bin/build
+++ /dev/null
@@ -1 +0,0 @@
-build-contents
\ No newline at end of file
diff --git a/cargo/jam/testdata/example-cnb/bin/detect b/cargo/jam/testdata/example-cnb/bin/detect
deleted file mode 100755
index f2091a73..00000000
--- a/cargo/jam/testdata/example-cnb/bin/detect
+++ /dev/null
@@ -1 +0,0 @@
-detect-contents
\ No newline at end of file
diff --git a/cargo/jam/testdata/example-cnb/bin/link b/cargo/jam/testdata/example-cnb/bin/link
deleted file mode 120000
index 9581f1d5..00000000
--- a/cargo/jam/testdata/example-cnb/bin/link
+++ /dev/null
@@ -1 +0,0 @@
-./build
\ No newline at end of file
diff --git a/cargo/jam/testdata/example-cnb/buildpack.toml b/cargo/jam/testdata/example-cnb/buildpack.toml
deleted file mode 100644
index f49dae3d..00000000
--- a/cargo/jam/testdata/example-cnb/buildpack.toml
+++ /dev/null
@@ -1,35 +0,0 @@
-api = "0.2"
-
-[buildpack]
- id = "some-buildpack-id"
- name = "some-buildpack-name"
- version = "version-string"
- homepage = "some-homepage-link"
-
-[metadata]
- include-files = ["bin/build", "bin/detect", "bin/link", "buildpack.toml", "generated-file"]
- pre-package = "./scripts/build.sh"
- [metadata.default-versions]
- some-dependency = "some-default-version"
-
- [[metadata.dependencies]]
- deprecation_date = 2019-04-01T00:00:00Z
- id = "some-dependency"
- name = "Some Dependency"
- sha256 = "shasum"
- stacks = ["io.buildpacks.stacks.bionic", "org.cloudfoundry.stacks.tiny"]
- uri = "http://some-url"
- version = "1.2.3"
-
- [[metadata.dependencies]]
- deprecation_date = 2022-04-01T00:00:00Z
- id = "other-dependency"
- name = "Other Dependency"
- sha256 = "shasum"
- stacks = ["org.cloudfoundry.stacks.tiny"]
- uri = "http://other-url"
- version = "4.5.6"
-
-[[stacks]]
- id = "some-stack-id"
- mixins = ["some-mixin-id"]
diff --git a/cargo/jam/testdata/example-cnb/scripts/build.sh b/cargo/jam/testdata/example-cnb/scripts/build.sh
deleted file mode 100755
index d33262e9..00000000
--- a/cargo/jam/testdata/example-cnb/scripts/build.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/bash
-readonly PROGDIR="$(cd "$(dirname "${0}")" && pwd)"
-
-echo "hello from the pre-packaging script"
-
-echo "hello" > "$PROGDIR/../generated-file"
-
-chmod 644 "$PROGDIR/../generated-file"
diff --git a/cargo/jam/testdata/example-language-family-cnb/buildpack.toml b/cargo/jam/testdata/example-language-family-cnb/buildpack.toml
deleted file mode 100644
index feef9c7b..00000000
--- a/cargo/jam/testdata/example-language-family-cnb/buildpack.toml
+++ /dev/null
@@ -1,38 +0,0 @@
-api = "0.2"
-
-[buildpack]
- id = "some-buildpack-id"
- name = "some-buildpack-name"
- version = "version-string"
-
-[metadata]
- include-files = ["buildpack.toml"]
-
- [[metadata.dependencies]]
- deprecation_date = 2019-04-01T00:00:00Z
- id = "some-dependency"
- name = "Some Dependency"
- sha256 = "shasum"
- stacks = ["io.buildpacks.stacks.bionic", "org.cloudfoundry.stacks.tiny"]
- uri = "http://some-url"
- version = "1.2.3"
-
- [[metadata.dependencies]]
- deprecation_date = 2022-04-01T00:00:00Z
- id = "other-dependency"
- name = "Other Dependency"
- sha256 = "shasum"
- stacks = ["org.cloudfoundry.stacks.tiny"]
- uri = "http://other-url"
- version = "4.5.6"
-
-[[order]]
- [[order.group]]
- id = "some-dependency"
- version = "1.2.3"
-
- [[order.group]]
- id = "other-dependency"
- version = "4.5.6"
-
-
diff --git a/cargo/jam/update_builder_test.go b/cargo/jam/update_builder_test.go
deleted file mode 100644
index 38f88cb1..00000000
--- a/cargo/jam/update_builder_test.go
+++ /dev/null
@@ -1,483 +0,0 @@
-package main_test
-
-import (
- "bytes"
- "fmt"
- "net/http"
- "net/http/httptest"
- "os"
- "os/exec"
- "path/filepath"
- "strings"
- "testing"
-
- "github.com/google/go-containerregistry/pkg/name"
- v1 "github.com/google/go-containerregistry/pkg/v1"
- "github.com/google/go-containerregistry/pkg/v1/remote"
- "github.com/onsi/gomega/gbytes"
- "github.com/onsi/gomega/gexec"
- "github.com/sclevine/spec"
-
- . "github.com/onsi/gomega"
- . "github.com/paketo-buildpacks/packit/matchers"
-)
-
-func mustConfigName(t *testing.T, img v1.Image) v1.Hash {
- h, err := img.ConfigName()
- if err != nil {
- t.Fatalf("ConfigName() = %v", err)
- }
- return h
-}
-
-func mustRawManifest(t *testing.T, img remote.Taggable) []byte {
- m, err := img.RawManifest()
- if err != nil {
- t.Fatalf("RawManifest() = %v", err)
- }
- return m
-}
-
-func mustRawConfigFile(t *testing.T, img v1.Image) []byte {
- c, err := img.RawConfigFile()
- if err != nil {
- t.Fatalf("RawConfigFile() = %v", err)
- }
- return c
-}
-
-func testUpdateBuilder(t *testing.T, context spec.G, it spec.S) {
- var (
- withT = NewWithT(t)
- Expect = withT.Expect
- Eventually = withT.Eventually
-
- server *httptest.Server
- builderDir string
- )
-
- it.Before(func() {
- goRef, err := name.ParseReference("gcr.io/paketo-buildpacks/go")
- Expect(err).ToNot(HaveOccurred())
- goImg, err := remote.Image(goRef)
- Expect(err).ToNot(HaveOccurred())
-
- nodeRef, err := name.ParseReference("paketobuildpacks/nodejs")
- Expect(err).ToNot(HaveOccurred())
- nodeImg, err := remote.Image(nodeRef)
- Expect(err).ToNot(HaveOccurred())
-
- goManifestPath := "/v2/paketo-buildpacks/go/manifests/0.0.10"
- goConfigPath := fmt.Sprintf("/v2/paketo-buildpacks/go/blobs/%s", mustConfigName(t, goImg))
- goManifestReqCount := 0
- nodeManifestPath := "/v2/paketobuildpacks/nodejs/manifests/0.20.22"
- nodeConfigPath := fmt.Sprintf("/v2/paketobuildpacks/nodejs/blobs/%s", mustConfigName(t, nodeImg))
- nodeManifestReqCount := 0
- server = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
-
- if req.Method == http.MethodHead {
- http.Error(w, "NotFound", http.StatusNotFound)
-
- return
- }
-
- switch req.URL.Path {
- case "/v2/":
- w.WriteHeader(http.StatusOK)
-
- case "/v2/paketo-buildpacks/go/tags/list":
- w.WriteHeader(http.StatusOK)
- fmt.Fprintln(w, `{
- "tags": [
- "0.0.10",
- "0.20.1",
- "0.20.12",
- "latest"
- ]
- }`)
-
- case "/v2/paketobuildpacks/nodejs/tags/list":
- w.WriteHeader(http.StatusOK)
- fmt.Fprintln(w, `{
- "tags": [
- "0.0.10",
- "0.1.0",
- "0.20.2",
- "0.20.22"
- ]
- }`)
-
- case "/v2/some-repository/lifecycle/tags/list":
- w.WriteHeader(http.StatusOK)
- fmt.Fprintln(w, `{
- "tags": [
- "0.0.10",
- "0.20.1",
- "0.21.1",
- "latest"
- ]
- }`)
-
- case "/v2/somerepository/build/tags/list":
- w.WriteHeader(http.StatusOK)
- fmt.Fprintln(w, `{
- "tags": [
- "0.0.10-some-cnb",
- "0.20.1",
- "0.20.12-some-cnb",
- "0.20.12-other-cnb",
- "latest"
- ]
- }`)
-
- case goConfigPath:
- if req.Method != http.MethodGet {
- t.Errorf("Method; got %v, want %v", req.Method, http.MethodGet)
- }
- _, _ = w.Write(mustRawConfigFile(t, goImg))
-
- case goManifestPath:
- goManifestReqCount++
- if req.Method != http.MethodGet {
- t.Errorf("Method; got %v, want %v", req.Method, http.MethodGet)
- }
- _, _ = w.Write(mustRawManifest(t, goImg))
-
- case nodeConfigPath:
- if req.Method != http.MethodGet {
- t.Errorf("Method; got %v, want %v", req.Method, http.MethodGet)
- }
- _, _ = w.Write(mustRawConfigFile(t, nodeImg))
-
- case nodeManifestPath:
- nodeManifestReqCount++
- if req.Method != http.MethodGet {
- t.Errorf("Method; got %v, want %v", req.Method, http.MethodGet)
- }
- _, _ = w.Write(mustRawManifest(t, nodeImg))
-
- case "/v2/some-repository/error-buildpack-id/tags/list":
- w.WriteHeader(http.StatusTeapot)
-
- case "/v2/some-repository/error-lifecycle/tags/list":
- w.WriteHeader(http.StatusTeapot)
-
- case "/v2/somerepository/error-build/tags/list":
- w.WriteHeader(http.StatusTeapot)
-
- case "/v2/some-repository/nonexistent-labels-id/tags/list":
- w.WriteHeader(http.StatusOK)
- fmt.Fprintln(w, `{
- "tags": [
- "0.1.0",
- "0.2.0",
- "latest"
- ]
- }`)
-
- case "/v2/some-repository/nonexistent-labels-id/manifests/0.2.0":
- w.WriteHeader(http.StatusBadRequest)
-
- default:
- t.Fatal(fmt.Sprintf("unknown path: %s", req.URL.Path))
- }
- }))
-
- builderDir, err = os.MkdirTemp("", "")
- Expect(err).NotTo(HaveOccurred())
-
- err = os.WriteFile(filepath.Join(builderDir, "builder.toml"), bytes.ReplaceAll([]byte(`
-description = "Some description"
-
-[[buildpacks]]
- uri = "docker://REGISTRY-URI/paketo-buildpacks/go:0.0.10"
- version = "0.0.10"
-
-[[buildpacks]]
- uri = "docker://REGISTRY-URI/paketobuildpacks/nodejs:0.20.22"
- version = "0.20.22"
-
-[lifecycle]
- version = "0.10.2"
-
-[[order]]
-
- [[order.group]]
- id = "paketo-buildpacks/nodejs"
-
-[[order]]
-
- [[order.group]]
- id = "paketo-buildpacks/go"
- version = "0.0.10"
- optional = true
-
-[stack]
- id = "io.paketo.stacks.some-stack"
- build-image = "REGISTRY-URI/somerepository/build:0.0.10-some-cnb"
- run-image = "REGISTRY-URI/somerepository/run:some-cnb"
- run-image-mirrors = ["REGISTRY-URI/some-repository/run:some-cnb"]
- `), []byte(`REGISTRY-URI`), []byte(strings.TrimPrefix(server.URL, "http://"))), 0600)
- Expect(err).NotTo(HaveOccurred())
- })
-
- it.After(func() {
- server.Close()
- Expect(os.RemoveAll(builderDir)).To(Succeed())
- })
-
- it("updates the builder files", func() {
- command := exec.Command(
- path,
- "update-builder",
- "--builder-file", filepath.Join(builderDir, "builder.toml"),
- "--lifecycle-uri", fmt.Sprintf("%s/some-repository/lifecycle", strings.TrimPrefix(server.URL, "http://")),
- )
-
- buffer := gbytes.NewBuffer()
- session, err := gexec.Start(command, buffer, buffer)
- Expect(err).NotTo(HaveOccurred())
-
- Eventually(session).Should(gexec.Exit(0), func() string { return string(buffer.Contents()) })
-
- builderContents, err := os.ReadFile(filepath.Join(builderDir, "builder.toml"))
- Expect(err).NotTo(HaveOccurred())
- Expect(string(builderContents)).To(MatchTOML(strings.ReplaceAll(`
-description = "Some description"
-
-[[buildpacks]]
- uri = "docker://REGISTRY-URI/paketo-buildpacks/go:0.20.12"
- version = "0.20.12"
-
-[[buildpacks]]
- uri = "docker://REGISTRY-URI/paketobuildpacks/nodejs:0.20.22"
- version = "0.20.22"
-
-[lifecycle]
- version = "0.21.1"
-
-[[order]]
-
- [[order.group]]
- id = "paketo-buildpacks/nodejs"
-
-[[order]]
-
- [[order.group]]
- id = "paketo-buildpacks/go"
- version = "0.20.12"
- optional = true
-
-[stack]
- id = "io.paketo.stacks.some-stack"
- build-image = "REGISTRY-URI/somerepository/build:0.20.12-some-cnb"
- run-image = "REGISTRY-URI/somerepository/run:some-cnb"
- run-image-mirrors = ["REGISTRY-URI/some-repository/run:some-cnb"]
- `, "REGISTRY-URI", strings.TrimPrefix(server.URL, "http://"))))
- })
-
- context("failure cases", func() {
- context("when the --builder-file flag is missing", func() {
- it("prints an error and exits non-zero", func() {
- command := exec.Command(
- path,
- "update-builder",
- "--lifecycle-uri", fmt.Sprintf("%s/some-repository/lifecycle", strings.TrimPrefix(server.URL, "http://")),
- )
-
- buffer := gbytes.NewBuffer()
- session, err := gexec.Start(command, buffer, buffer)
- Expect(err).NotTo(HaveOccurred())
-
- Eventually(session).Should(gexec.Exit(1), func() string { return string(buffer.Contents()) })
- Expect(string(buffer.Contents())).To(ContainSubstring("Error: required flag(s) \"builder-file\" not set"))
- })
- })
-
- context("when the builder file cannot be found", func() {
- it("prints an error and exits non-zero", func() {
- command := exec.Command(
- path,
- "update-builder",
- "--builder-file", "/no/such/file",
- "--lifecycle-uri", fmt.Sprintf("%s/some-repository/lifecycle", strings.TrimPrefix(server.URL, "http://")),
- )
-
- buffer := gbytes.NewBuffer()
- session, err := gexec.Start(command, buffer, buffer)
- Expect(err).NotTo(HaveOccurred())
-
- Eventually(session).Should(gexec.Exit(1), func() string { return string(buffer.Contents()) })
- Expect(string(buffer.Contents())).To(ContainSubstring("failed to execute: failed to open builder config file: open /no/such/file: no such file or directory"))
- })
- })
-
- context("when the latest buildpack image cannot be found", func() {
- it.Before(func() {
- err := os.WriteFile(filepath.Join(builderDir, "builder.toml"), bytes.ReplaceAll([]byte(`
-[[buildpacks]]
- uri = "docker://REGISTRY-URI/some-repository/error-buildpack-id:0.0.10"
- version = "0.0.10"
- `), []byte(`REGISTRY-URI`), []byte(strings.TrimPrefix(server.URL, "http://"))), 0600)
- Expect(err).NotTo(HaveOccurred())
- })
-
- it("prints an error and exits non-zero", func() {
- command := exec.Command(
- path,
- "update-builder",
- "--builder-file", filepath.Join(builderDir, "builder.toml"),
- "--lifecycle-uri", fmt.Sprintf("%s/some-repository/lifecycle", strings.TrimPrefix(server.URL, "http://")),
- )
-
- buffer := gbytes.NewBuffer()
- session, err := gexec.Start(command, buffer, buffer)
- Expect(err).NotTo(HaveOccurred())
-
- Eventually(session).Should(gexec.Exit(1), func() string { return string(buffer.Contents()) })
- Expect(string(buffer.Contents())).To(ContainSubstring("failed to list tags"))
- })
- })
-
- context("when the latest lifecycle image cannot be found", func() {
- it("prints an error and exits non-zero", func() {
- command := exec.Command(
- path,
- "update-builder",
- "--builder-file", filepath.Join(builderDir, "builder.toml"),
- "--lifecycle-uri", fmt.Sprintf("%s/some-repository/error-lifecycle", strings.TrimPrefix(server.URL, "http://")),
- )
-
- buffer := gbytes.NewBuffer()
- session, err := gexec.Start(command, buffer, buffer)
- Expect(err).NotTo(HaveOccurred())
-
- Eventually(session).Should(gexec.Exit(1), func() string { return string(buffer.Contents()) })
- Expect(string(buffer.Contents())).To(ContainSubstring("failed to list tags"))
- })
- })
-
- context("when the buildpackage ID cannot be retrieved", func() {
- it.Before(func() {
- err := os.WriteFile(filepath.Join(builderDir, "builder.toml"), bytes.ReplaceAll([]byte(`
-description = "Some description"
-
-[[buildpacks]]
- uri = "docker://REGISTRY-URI/some-repository/nonexistent-labels-id:0.2.0"
- version = "0.2.0"
-
-[lifecycle]
- version = "0.10.2"
-
-[[order]]
-
- [[order.group]]
- id = "some-repository/nonexistent-labels-id"
- version = "0.2.0"
-
-[stack]
- id = "io.paketo.stacks.some-stack"
- build-image = "REGISTRY-URI/somerepository/error-build:0.0.10-some-cnb"
- run-image = "REGISTRY-URI/somerepository/run:some-cnb"
- run-image-mirrors = ["REGISTRY-URI/some-repository/run:some-cnb"]
- `), []byte(`REGISTRY-URI`), []byte(strings.TrimPrefix(server.URL, "http://"))), 0600)
- Expect(err).NotTo(HaveOccurred())
-
- })
-
- it("prints an error and exits non-zero", func() {
- command := exec.Command(
- path,
- "update-builder",
- "--builder-file", filepath.Join(builderDir, "builder.toml"),
- "--lifecycle-uri", fmt.Sprintf("%s/some-repository/lifecycle", strings.TrimPrefix(server.URL, "http://")),
- )
-
- buffer := gbytes.NewBuffer()
- session, err := gexec.Start(command, buffer, buffer)
- Expect(err).NotTo(HaveOccurred())
-
- Eventually(session).Should(gexec.Exit(1), func() string { return string(buffer.Contents()) })
- Expect(string(buffer.Contents())).To(MatchRegexp(`failed to get buildpackage ID for \d+\.\d+\.\d+\.\d+\:\d+\/some\-repository\/nonexistent\-labels\-id\:0\.2\.0\:`))
- Expect(string(buffer.Contents())).To(ContainSubstring("unexpected status code 400 Bad Request"))
- })
- })
-
- context("when the latest build image cannot be found", func() {
- it.Before(func() {
- err := os.WriteFile(filepath.Join(builderDir, "builder.toml"), bytes.ReplaceAll([]byte(`
-description = "Some description"
-
-[[buildpacks]]
- uri = "docker://REGISTRY-URI/paketo-buildpacks/go:0.0.10"
- version = "0.0.10"
-
-[[buildpacks]]
- uri = "docker://REGISTRY-URI/paketobuildpacks/nodejs:0.20.22"
- version = "0.20.22"
-
-[lifecycle]
- version = "0.10.2"
-
-[[order]]
-
- [[order.group]]
- id = "paketo-buildpacks/nodejs"
- version = "0.20.22"
-
-[[order]]
-
- [[order.group]]
- id = "paketo-buildpacks/go"
- version = "0.0.10"
-
-[stack]
- id = "io.paketo.stacks.some-stack"
- build-image = "REGISTRY-URI/somerepository/error-build:0.0.10-some-cnb"
- run-image = "REGISTRY-URI/somerepository/run:some-cnb"
- run-image-mirrors = ["REGISTRY-URI/some-repository/run:some-cnb"]
- `), []byte(`REGISTRY-URI`), []byte(strings.TrimPrefix(server.URL, "http://"))), 0600)
- Expect(err).NotTo(HaveOccurred())
- })
-
- it("prints an error and exits non-zero", func() {
- command := exec.Command(
- path,
- "update-builder",
- "--builder-file", filepath.Join(builderDir, "builder.toml"),
- "--lifecycle-uri", fmt.Sprintf("%s/some-repository/lifecycle", strings.TrimPrefix(server.URL, "http://")),
- )
-
- buffer := gbytes.NewBuffer()
- session, err := gexec.Start(command, buffer, buffer)
- Expect(err).NotTo(HaveOccurred())
-
- Eventually(session).Should(gexec.Exit(1), func() string { return string(buffer.Contents()) })
- Expect(string(buffer.Contents())).To(ContainSubstring("failed to list tags"))
- })
- })
-
- context("when the builder file cannot be overwritten", func() {
- it.Before(func() {
- err := os.Chmod(filepath.Join(builderDir, "builder.toml"), 0400)
- Expect(err).NotTo(HaveOccurred())
- })
-
- it("prints an error and exits non-zero", func() {
- command := exec.Command(
- path,
- "update-builder",
- "--builder-file", filepath.Join(builderDir, "builder.toml"),
- "--lifecycle-uri", fmt.Sprintf("%s/some-repository/lifecycle", strings.TrimPrefix(server.URL, "http://")),
- )
-
- buffer := gbytes.NewBuffer()
- session, err := gexec.Start(command, buffer, buffer)
- Expect(err).NotTo(HaveOccurred())
-
- Eventually(session).Should(gexec.Exit(1), func() string { return string(buffer.Contents()) })
- Expect(string(buffer.Contents())).To(ContainSubstring("failed to open builder config"))
- })
- })
- })
-}
diff --git a/cargo/jam/update_buildpack_test.go b/cargo/jam/update_buildpack_test.go
deleted file mode 100644
index c57ffb6b..00000000
--- a/cargo/jam/update_buildpack_test.go
+++ /dev/null
@@ -1,494 +0,0 @@
-package main_test
-
-import (
- "bytes"
- "fmt"
- "net/http"
- "net/http/httptest"
- "os"
- "os/exec"
- "path/filepath"
- "strings"
- "testing"
-
- "github.com/google/go-containerregistry/pkg/name"
- "github.com/google/go-containerregistry/pkg/v1/remote"
- "github.com/onsi/gomega/gbytes"
- "github.com/onsi/gomega/gexec"
- "github.com/sclevine/spec"
-
- . "github.com/onsi/gomega"
- . "github.com/paketo-buildpacks/packit/matchers"
-)
-
-func testUpdateBuildpack(t *testing.T, context spec.G, it spec.S) {
- var (
- withT = NewWithT(t)
- Expect = withT.Expect
- Eventually = withT.Eventually
-
- server *httptest.Server
- buildpackDir string
- )
-
- it.Before(func() {
- goRef, err := name.ParseReference("gcr.io/paketo-buildpacks/go-dist")
- Expect(err).ToNot(HaveOccurred())
- goImg, err := remote.Image(goRef)
- Expect(err).ToNot(HaveOccurred())
-
- nodeRef, err := name.ParseReference("paketobuildpacks/node-engine")
- Expect(err).ToNot(HaveOccurred())
- nodeImg, err := remote.Image(nodeRef)
- Expect(err).ToNot(HaveOccurred())
-
- rubyRef, err := name.ParseReference("paketobuildpacks/mri")
- Expect(err).ToNot(HaveOccurred())
- rubyImg, err := remote.Image(rubyRef)
- Expect(err).ToNot(HaveOccurred())
-
- goManifestPath := "/v2/paketo-buildpacks/go-dist/manifests/0.20.1"
- goConfigPath := fmt.Sprintf("/v2/paketo-buildpacks/go-dist/blobs/%s", mustConfigName(t, goImg))
- goManifestReqCount := 0
- nodeManifestPath := "/v2/paketobuildpacks/node-engine/manifests/0.1.0"
- nodeConfigPath := fmt.Sprintf("/v2/paketobuildpacks/node-engine/blobs/%s", mustConfigName(t, nodeImg))
- nodeManifestReqCount := 0
- rubyManifestPath := "/v2/paketobuildpacks/mri/manifests/0.2.0"
- rubyConfigPath := fmt.Sprintf("/v2/paketobuildpacks/mri/blobs/%s", mustConfigName(t, rubyImg))
- rubyManifestReqCount := 0
-
- server = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
- if req.Method == http.MethodHead {
- http.Error(w, "NotFound", http.StatusNotFound)
-
- return
- }
-
- switch req.URL.Path {
- case "/v2/":
- w.WriteHeader(http.StatusOK)
-
- case "/v2/paketo-buildpacks/go-dist/tags/list":
- w.WriteHeader(http.StatusOK)
- fmt.Fprintln(w, `{
- "tags": [
- "0.0.10",
- "0.20.1",
- "0.20.12",
- "latest"
- ]
- }`)
-
- case "/v2/paketobuildpacks/node-engine/tags/list":
- w.WriteHeader(http.StatusOK)
- fmt.Fprintln(w, `{
- "tags": [
- "0.0.10",
- "0.1.0",
- "0.20.2",
- "0.20.22"
- ]
- }`)
-
- case "/v2/paketobuildpacks/mri/tags/list":
- w.WriteHeader(http.StatusOK)
- fmt.Fprintln(w, `{
- "tags": [
- "0.0.10",
- "0.1.0",
- "0.2.0",
- "latest"
- ]
- }`)
-
- case goConfigPath:
- if req.Method != http.MethodGet {
- t.Errorf("Method; got %v, want %v", req.Method, http.MethodGet)
- }
- _, _ = w.Write(mustRawConfigFile(t, goImg))
-
- case goManifestPath:
- goManifestReqCount++
- if req.Method != http.MethodGet {
- t.Errorf("Method; got %v, want %v", req.Method, http.MethodGet)
- }
- _, _ = w.Write(mustRawManifest(t, goImg))
-
- case nodeConfigPath:
- if req.Method != http.MethodGet {
- t.Errorf("Method; got %v, want %v", req.Method, http.MethodGet)
- }
- _, _ = w.Write(mustRawConfigFile(t, nodeImg))
-
- case nodeManifestPath:
- nodeManifestReqCount++
- if req.Method != http.MethodGet {
- t.Errorf("Method; got %v, want %v", req.Method, http.MethodGet)
- }
- _, _ = w.Write(mustRawManifest(t, nodeImg))
-
- case rubyConfigPath:
- if req.Method != http.MethodGet {
- t.Errorf("Method; got %v, want %v", req.Method, http.MethodGet)
- }
- _, _ = w.Write(mustRawConfigFile(t, rubyImg))
-
- case rubyManifestPath:
- rubyManifestReqCount++
- if req.Method != http.MethodGet {
- t.Errorf("Method; got %v, want %v", req.Method, http.MethodGet)
- }
- _, _ = w.Write(mustRawManifest(t, rubyImg))
-
- case "/v2/some-repository/error-buildpack-id/tags/list":
- w.WriteHeader(http.StatusTeapot)
-
- case "/v2/some-repository/nonexistent-labels-id/tags/list":
- w.WriteHeader(http.StatusOK)
- fmt.Fprintln(w, `{
- "tags": [
- "0.1.0",
- "0.2.0",
- "latest"
- ]
- }`)
-
- case "/v2/some-repository/nonexistent-labels-id/manifests/0.2.0":
- w.WriteHeader(http.StatusBadRequest)
-
- default:
- t.Fatal(fmt.Sprintf("unknown path: %s", req.URL.Path))
- }
- }))
-
- buildpackDir, err = os.MkdirTemp("", "")
- Expect(err).NotTo(HaveOccurred())
-
- err = os.WriteFile(filepath.Join(buildpackDir, "buildpack.toml"), []byte(`
- api = "0.2"
-
- [buildpack]
- id = "some-composite-buildpack"
- name = "Some Composite Buildpack"
- version = "some-composite-buildpack-version"
-
- [metadata]
- include-files = ["buildpack.toml"]
-
- [[order]]
- [[order.group]]
- id = "paketo-buildpacks/go-dist"
- version = "0.20.1"
-
- [[order.group]]
- id = "paketo-buildpacks/mri"
- version = "0.2.0"
-
- [[order]]
- [[order.group]]
- id = "paketo-buildpacks/node-engine"
- version = "0.1.0"
- optional = true
-
- [[order.group]]
- id = "paketo-buildpacks/go-dist"
- version = "0.20.1"
- `), 0600)
- Expect(err).NotTo(HaveOccurred())
-
- err = os.WriteFile(filepath.Join(buildpackDir, "package.toml"), bytes.ReplaceAll([]byte(`
- [buildpack]
- uri = "build/buildpack.tgz"
-
- [[dependencies]]
- uri = "docker://REGISTRY-URI/paketobuildpacks/mri:0.2.0"
-
- [[dependencies]]
- uri = "docker://REGISTRY-URI/paketo-buildpacks/go-dist:0.20.1"
-
- [[dependencies]]
- uri = "docker://REGISTRY-URI/paketobuildpacks/node-engine:0.1.0"
- `), []byte(`REGISTRY-URI`), []byte(strings.TrimPrefix(server.URL, "http://"))), 0600)
- Expect(err).NotTo(HaveOccurred())
- })
-
- it.After(func() {
- server.Close()
- Expect(os.RemoveAll(buildpackDir)).To(Succeed())
- })
-
- it("updates the buildpack.toml and package.toml files", func() {
- command := exec.Command(
- path,
- "update-buildpack",
- "--buildpack-file", filepath.Join(buildpackDir, "buildpack.toml"),
- "--package-file", filepath.Join(buildpackDir, "package.toml"),
- )
-
- buffer := gbytes.NewBuffer()
- session, err := gexec.Start(command, buffer, buffer)
- Expect(err).NotTo(HaveOccurred())
-
- Eventually(session).Should(gexec.Exit(0), func() string { return string(buffer.Contents()) })
-
- buildpackContents, err := os.ReadFile(filepath.Join(buildpackDir, "buildpack.toml"))
- Expect(err).NotTo(HaveOccurred())
- Expect(string(buildpackContents)).To(MatchTOML(`
- api = "0.2"
-
- [buildpack]
- id = "some-composite-buildpack"
- name = "Some Composite Buildpack"
- version = "some-composite-buildpack-version"
-
- [metadata]
- include-files = ["buildpack.toml"]
-
- [[order]]
- [[order.group]]
- id = "paketo-buildpacks/go-dist"
- version = "0.20.12"
-
- [[order.group]]
- id = "paketo-buildpacks/mri"
- version = "0.2.0"
-
- [[order]]
- [[order.group]]
- id = "paketo-buildpacks/node-engine"
- version = "0.20.22"
- optional = true
-
- [[order.group]]
- id = "paketo-buildpacks/go-dist"
- version = "0.20.12"
- `))
-
- packageContents, err := os.ReadFile(filepath.Join(buildpackDir, "package.toml"))
- Expect(err).NotTo(HaveOccurred())
- Expect(string(packageContents)).To(MatchTOML(strings.ReplaceAll(`
- [buildpack]
- uri = "build/buildpack.tgz"
-
- [[dependencies]]
- uri = "docker://REGISTRY-URI/paketobuildpacks/mri:0.2.0"
-
- [[dependencies]]
- uri = "docker://REGISTRY-URI/paketo-buildpacks/go-dist:0.20.12"
-
- [[dependencies]]
- uri = "docker://REGISTRY-URI/paketobuildpacks/node-engine:0.20.22"
- `, "REGISTRY-URI", strings.TrimPrefix(server.URL, "http://"))))
- })
-
- context("failure cases", func() {
- context("when the --buildpack-file flag is missing", func() {
- it("prints an error and exits non-zero", func() {
- command := exec.Command(
- path,
- "update-buildpack",
- "--package-file", filepath.Join(buildpackDir, "package.toml"),
- )
-
- buffer := gbytes.NewBuffer()
- session, err := gexec.Start(command, buffer, buffer)
- Expect(err).NotTo(HaveOccurred())
-
- Eventually(session).Should(gexec.Exit(1), func() string { return string(buffer.Contents()) })
- Expect(string(buffer.Contents())).To(ContainSubstring("Error: required flag(s) \"buildpack-file\" not set"))
- })
- })
-
- context("when the --package-file flag is missing", func() {
- it("prints an error and exits non-zero", func() {
- command := exec.Command(
- path,
- "update-buildpack",
- "--buildpack-file", filepath.Join(buildpackDir, "buildpack.toml"),
- )
-
- buffer := gbytes.NewBuffer()
- session, err := gexec.Start(command, buffer, buffer)
- Expect(err).NotTo(HaveOccurred())
-
- Eventually(session).Should(gexec.Exit(1), func() string { return string(buffer.Contents()) })
- Expect(string(buffer.Contents())).To(ContainSubstring("Error: required flag(s) \"package-file\" not set"))
- })
- })
-
- context("when the buildpack file does not exist", func() {
- it("prints an error and exits non-zero", func() {
- command := exec.Command(
- path,
- "update-buildpack",
- "--buildpack-file", "/no/such/file",
- "--package-file", filepath.Join(buildpackDir, "package.toml"),
- )
-
- buffer := gbytes.NewBuffer()
- session, err := gexec.Start(command, buffer, buffer)
- Expect(err).NotTo(HaveOccurred())
-
- Eventually(session).Should(gexec.Exit(1), func() string { return string(buffer.Contents()) })
- Expect(string(buffer.Contents())).To(ContainSubstring("failed to execute: failed to open buildpack config file: open /no/such/file: no such file or directory"))
- })
- })
-
- context("when the package file does not exist", func() {
- it("prints an error and exits non-zero", func() {
- command := exec.Command(
- path,
- "update-buildpack",
- "--buildpack-file", filepath.Join(buildpackDir, "buildpack.toml"),
- "--package-file", "/no/such/file",
- )
-
- buffer := gbytes.NewBuffer()
- session, err := gexec.Start(command, buffer, buffer)
- Expect(err).NotTo(HaveOccurred())
-
- Eventually(session).Should(gexec.Exit(1), func() string { return string(buffer.Contents()) })
- Expect(string(buffer.Contents())).To(ContainSubstring("failed to execute: failed to open package config file: open /no/such/file: no such file or directory"))
- })
- })
-
- context("when the latest image reference cannot be found", func() {
- it.Before(func() {
- err := os.WriteFile(filepath.Join(buildpackDir, "buildpack.toml"), []byte(`
- api = "0.2"
-
- [buildpack]
- id = "some-composite-buildpack"
- name = "Some Composite Buildpack"
- version = "some-composite-buildpack-version"
-
- [metadata]
- include-files = ["buildpack.toml"]
-
- [[order]]
- [[order.group]]
- id = "some-repository/error-buildpack-id"
- version = "0.20.1"
- `), 0600)
- Expect(err).NotTo(HaveOccurred())
-
- err = os.WriteFile(filepath.Join(buildpackDir, "package.toml"), bytes.ReplaceAll([]byte(`
- [buildpack]
- uri = "build/buildpack.tgz"
-
- [[dependencies]]
- uri = "docker://REGISTRY-URI/some-repository/error-buildpack-id:0.20.1"
- `), []byte(`REGISTRY-URI`), []byte(strings.TrimPrefix(server.URL, "http://"))), 0600)
- Expect(err).NotTo(HaveOccurred())
- })
-
- it("prints an error and exits non-zero", func() {
- command := exec.Command(
- path,
- "update-buildpack",
- "--buildpack-file", filepath.Join(buildpackDir, "buildpack.toml"),
- "--package-file", filepath.Join(buildpackDir, "package.toml"),
- )
-
- buffer := gbytes.NewBuffer()
- session, err := gexec.Start(command, buffer, buffer)
- Expect(err).NotTo(HaveOccurred())
-
- Eventually(session).Should(gexec.Exit(1), func() string { return string(buffer.Contents()) })
- Expect(string(buffer.Contents())).To(ContainSubstring("failed to list tags"))
- })
- })
-
- context("when the buildpackage ID cannot be retrieved", func() {
- it.Before(func() {
- err := os.WriteFile(filepath.Join(buildpackDir, "buildpack.toml"), []byte(`
- api = "0.2"
-
- [buildpack]
- id = "some-composite-buildpack"
- name = "Some Composite Buildpack"
- version = "some-composite-buildpack-version"
-
- [metadata]
- include-files = ["buildpack.toml"]
-
- [[order]]
- [[order.group]]
- id = "some-repository/nonexistent-labels-id"
- version = "0.2.0"
- `), 0600)
- Expect(err).NotTo(HaveOccurred())
-
- err = os.WriteFile(filepath.Join(buildpackDir, "package.toml"), bytes.ReplaceAll([]byte(`
- [buildpack]
- uri = "build/buildpack.tgz"
-
- [[dependencies]]
- uri = "docker://REGISTRY-URI/some-repository/nonexistent-labels-id:0.2.0"
- `), []byte(`REGISTRY-URI`), []byte(strings.TrimPrefix(server.URL, "http://"))), 0600)
- Expect(err).NotTo(HaveOccurred())
- })
-
- it("prints an error and exits non-zero", func() {
- command := exec.Command(
- path,
- "update-buildpack",
- "--buildpack-file", filepath.Join(buildpackDir, "buildpack.toml"),
- "--package-file", filepath.Join(buildpackDir, "package.toml"),
- )
-
- buffer := gbytes.NewBuffer()
- session, err := gexec.Start(command, buffer, buffer)
- Expect(err).NotTo(HaveOccurred())
-
- Eventually(session).Should(gexec.Exit(1), func() string { return string(buffer.Contents()) })
- Expect(string(buffer.Contents())).To(MatchRegexp(`failed to get buildpackage ID for \d+\.\d+\.\d+\.\d+\:\d+\/some\-repository\/nonexistent\-labels\-id\:0\.2\.0\:`))
- Expect(string(buffer.Contents())).To(ContainSubstring("unexpected status code 400 Bad Request"))
- })
- })
-
- context("when the buildpack file cannot be overwritten", func() {
- it.Before(func() {
- Expect(os.Chmod(filepath.Join(buildpackDir, "buildpack.toml"), 0400)).To(Succeed())
- })
-
- it("prints an error and exits non-zero", func() {
- command := exec.Command(
- path,
- "update-buildpack",
- "--buildpack-file", filepath.Join(buildpackDir, "buildpack.toml"),
- "--package-file", filepath.Join(buildpackDir, "package.toml"),
- )
-
- buffer := gbytes.NewBuffer()
- session, err := gexec.Start(command, buffer, buffer)
- Expect(err).NotTo(HaveOccurred())
-
- Eventually(session).Should(gexec.Exit(1), func() string { return string(buffer.Contents()) })
- Expect(string(buffer.Contents())).To(ContainSubstring("failed to open buildpack config"))
- })
- })
-
- context("when the package file cannot be overwritten", func() {
- it.Before(func() {
- Expect(os.Chmod(filepath.Join(buildpackDir, "package.toml"), 0400)).To(Succeed())
- })
-
- it("prints an error and exits non-zero", func() {
- command := exec.Command(
- path,
- "update-buildpack",
- "--buildpack-file", filepath.Join(buildpackDir, "buildpack.toml"),
- "--package-file", filepath.Join(buildpackDir, "package.toml"),
- )
-
- buffer := gbytes.NewBuffer()
- session, err := gexec.Start(command, buffer, buffer)
- Expect(err).NotTo(HaveOccurred())
-
- Eventually(session).Should(gexec.Exit(1), func() string { return string(buffer.Contents()) })
- Expect(string(buffer.Contents())).To(ContainSubstring("failed to open package config"))
- })
- })
- })
-}
diff --git a/cargo/jam/update_dependencies_test.go b/cargo/jam/update_dependencies_test.go
deleted file mode 100644
index aa5d520c..00000000
--- a/cargo/jam/update_dependencies_test.go
+++ /dev/null
@@ -1,584 +0,0 @@
-package main_test
-
-import (
- "fmt"
- "net/http"
- "net/http/httptest"
- "os"
- "os/exec"
- "path/filepath"
- "testing"
-
- "github.com/onsi/gomega/gbytes"
- "github.com/onsi/gomega/gexec"
- "github.com/sclevine/spec"
-
- . "github.com/onsi/gomega"
- . "github.com/paketo-buildpacks/packit/matchers"
-)
-
-func testUpdateDependencies(t *testing.T, context spec.G, it spec.S) {
- var (
- withT = NewWithT(t)
- Expect = withT.Expect
- Eventually = withT.Eventually
-
- server *httptest.Server
- buildpackDir string
- )
-
- it.Before(func() {
- var err error
- server = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
- if req.Method == http.MethodHead {
- http.Error(w, "NotFound", http.StatusNotFound)
- return
- }
-
- switch req.URL.Path {
- case "/v2/":
- w.WriteHeader(http.StatusOK)
-
- case "/v1/dependency":
- if req.URL.RawQuery == "name=node" {
- w.WriteHeader(http.StatusOK)
- fmt.Fprintln(w, `[
- {
- "name": "node",
- "version": "v1.2.4",
- "sha256": "some-sha",
- "uri": "some-dep-uri",
- "stacks": [
- {
- "id": "io.buildpacks.stacks.bionic"
- }
- ],
- "source": "some-source",
- "source_sha256": "some-source-sha",
- "cpe": "node-cpe",
- "purl": "some-purl",
- "licenses": ["MIT", "MIT-2"]
- },
- {
- "name": "node",
- "version": "v1.3.5",
- "sha256": "some-sha",
- "uri": "some-dep-uri",
- "stacks": [
- {
- "id": "io.buildpacks.stacks.bionic"
- }
- ],
- "source": "some-source",
- "source_sha256": "some-source-sha",
- "cpe": "node-cpe",
- "purl": "some-purl",
- "licenses": ["MIT", "MIT-2"]
- },
- {
- "name": "node",
- "version": "v2.1.9",
- "sha256": "some-sha",
- "uri": "some-dep-uri",
- "stacks": [
- {
- "id": "io.buildpacks.stacks.bionic"
- }
- ],
- "source": "some-source",
- "source_sha256": "some-source-sha",
- "cpe": "node-cpe",
- "purl": "some-purl",
- "licenses": ["MIT", "MIT-2"]
- },
- {
- "name": "node",
- "version": "v2.2.5",
- "sha256": "some-sha",
- "uri": "some-dep-uri",
- "stacks": [
- {
- "id": "io.buildpacks.stacks.bionic"
- }
- ],
- "source": "some-source",
- "source_sha256": "some-source-sha",
- "cpe": "node-cpe",
- "purl": "some-purl",
- "licenses": ["MIT", "MIT-2"]
- }]`)
- }
-
- if req.URL.RawQuery == "name=non-existent" {
- w.WriteHeader(http.StatusInternalServerError)
- fmt.Fprintln(w, `{"error": "error getting dependency metadata"}`)
- }
-
- default:
- t.Fatal(fmt.Sprintf("unknown path: %s", req.URL.Path))
- }
- }))
-
- buildpackDir, err = os.MkdirTemp("", "")
- Expect(err).NotTo(HaveOccurred())
-
- err = os.WriteFile(filepath.Join(buildpackDir, "buildpack.toml"), []byte(`
- api = "0.2"
-
- [buildpack]
- id = "some-buildpack"
- name = "Some Buildpack"
- version = "some-buildpack-version"
-
- [metadata]
- include-files = ["buildpack.toml"]
-
- [[metadata.dependencies]]
- cpe = "node-cpe"
- purl = "some-purl"
- id = "node"
- name = "Node Engine"
- sha256 = "some-sha"
- source = "some-source"
- source_sha256 = "some-source-sha"
- stacks = ["io.buildpacks.stacks.bionic"]
- uri = "some-dep-uri"
- version = "1.2.3"
-
- [[metadata.dependencies]]
- cpe = "node-cpe"
- purl = "some-purl"
- id = "node"
- name = "Node Engine"
- sha256 = "some-sha"
- source = "some-source"
- source_sha256 = "some-source-sha"
- stacks = ["io.buildpacks.stacks.bionic"]
- uri = "some-dep-uri"
- version = "2.1.1"
-
- [[metadata.dependencies]]
- cpe = "node-cpe"
- purl = "some-purl"
- id = "node"
- name = "Node Engine"
- sha256 = "some-sha"
- source = "some-source"
- source_sha256 = "some-source-sha"
- stacks = ["io.buildpacks.stacks.bionic"]
- uri = "some-dep-uri"
- version = "2.2.5"
-
- [[metadata.dependency-constraints]]
- constraint = "1.*"
- id = "node"
- patches = 1
-
- [[metadata.dependency-constraints]]
- constraint = "2.*"
- id = "node"
- patches = 2
-
- [[stacks]]
- id = "io.buildpacks.stacks.bionic"
- `), 0644)
- Expect(err).NotTo(HaveOccurred())
- })
-
- it.After(func() {
- server.Close()
- Expect(os.RemoveAll(buildpackDir)).To(Succeed())
- })
-
- it("updates the buildpack.toml dependencies", func() {
- command := exec.Command(
- path,
- "update-dependencies",
- "--buildpack-file", filepath.Join(buildpackDir, "buildpack.toml"),
- "--api", server.URL,
- )
-
- buffer := gbytes.NewBuffer()
- session, err := gexec.Start(command, buffer, buffer)
- Expect(err).NotTo(HaveOccurred())
-
- Eventually(session).Should(gexec.Exit(0), func() string { return string(buffer.Contents()) })
-
- buildpackContents, err := os.ReadFile(filepath.Join(buildpackDir, "buildpack.toml"))
- Expect(err).NotTo(HaveOccurred())
- Expect(string(buildpackContents)).To(MatchTOML(`
-api = "0.2"
-
-[buildpack]
- id = "some-buildpack"
- name = "Some Buildpack"
- version = "some-buildpack-version"
-
-[metadata]
- include-files = ["buildpack.toml"]
-
-[[metadata.dependencies]]
- cpe = "node-cpe"
- purl = "some-purl"
- id = "node"
- licenses = ["MIT", "MIT-2"]
- name = "Node Engine"
- sha256 = "some-sha"
- source = "some-source"
- source_sha256 = "some-source-sha"
- stacks = ["io.buildpacks.stacks.bionic"]
- uri = "some-dep-uri"
- version = "1.3.5"
-
-[[metadata.dependencies]]
- cpe = "node-cpe"
- purl = "some-purl"
- id = "node"
- licenses = ["MIT", "MIT-2"]
- name = "Node Engine"
- sha256 = "some-sha"
- source = "some-source"
- source_sha256 = "some-source-sha"
- stacks = ["io.buildpacks.stacks.bionic"]
- uri = "some-dep-uri"
- version = "2.1.9"
-
-[[metadata.dependencies]]
- cpe = "node-cpe"
- purl = "some-purl"
- id = "node"
- licenses = ["MIT", "MIT-2"]
- name = "Node Engine"
- sha256 = "some-sha"
- source = "some-source"
- source_sha256 = "some-source-sha"
- stacks = ["io.buildpacks.stacks.bionic"]
- uri = "some-dep-uri"
- version = "2.2.5"
-
-[[metadata.dependency-constraints]]
- constraint = "1.*"
- id = "node"
- patches = 1
-
-[[metadata.dependency-constraints]]
- constraint = "2.*"
- id = "node"
- patches = 2
-
-[[stacks]]
- id = "io.buildpacks.stacks.bionic"
- `))
- })
-
- context("the server has less patches available than requested in constraint", func() {
- it.Before(func() {
- err := os.WriteFile(filepath.Join(buildpackDir, "buildpack.toml"), []byte(`
- api = "0.2"
-
- [buildpack]
- id = "some-buildpack"
- name = "Some Buildpack"
- version = "some-buildpack-version"
-
- [metadata]
- include-files = ["buildpack.toml"]
-
- [[metadata.dependencies]]
- cpe = "node-cpe"
- purl = "some-purl"
- id = "node"
- licenses = ["MIT", "MIT-2"]
- name = "Node Engine"
- sha256 = "some-sha"
- source = "some-source"
- source_sha256 = "some-source-sha"
- stacks = ["io.buildpacks.stacks.bionic"]
- uri = "some-dep-uri"
- version = "2.2.3"
-
- [[metadata.dependency-constraints]]
- constraint = "2.2.*"
- id = "node"
- patches = 3
-
- [[stacks]]
- id = "io.buildpacks.stacks.bionic"
- `), 0644)
-
- Expect(err).ToNot(HaveOccurred())
- })
- it.After(func() {
- Expect(os.RemoveAll(buildpackDir)).To(Succeed())
- })
-
- it("updates the buildpack.toml dependencies with as many as are available", func() {
- command := exec.Command(
- path,
- "update-dependencies",
- "--buildpack-file", filepath.Join(buildpackDir, "buildpack.toml"),
- "--api", server.URL,
- )
-
- buffer := gbytes.NewBuffer()
- session, err := gexec.Start(command, buffer, buffer)
- Expect(err).NotTo(HaveOccurred())
-
- Eventually(session).Should(gexec.Exit(0), func() string { return string(buffer.Contents()) })
-
- buildpackContents, err := os.ReadFile(filepath.Join(buildpackDir, "buildpack.toml"))
- Expect(err).NotTo(HaveOccurred())
- Expect(string(buildpackContents)).To(MatchTOML(`
-api = "0.2"
-
-[buildpack]
- id = "some-buildpack"
- name = "Some Buildpack"
- version = "some-buildpack-version"
-
-[metadata]
- include-files = ["buildpack.toml"]
-
-[[metadata.dependencies]]
- cpe = "node-cpe"
- purl = "some-purl"
- id = "node"
- licenses = ["MIT", "MIT-2"]
- name = "Node Engine"
- sha256 = "some-sha"
- source = "some-source"
- source_sha256 = "some-source-sha"
- stacks = ["io.buildpacks.stacks.bionic"]
- uri = "some-dep-uri"
- version = "2.2.5"
-
-[[metadata.dependency-constraints]]
- constraint = "2.2.*"
- id = "node"
- patches = 3
-
-[[stacks]]
- id = "io.buildpacks.stacks.bionic"
- `))
- })
- })
-
- context("the server serves a different dependency", func() {
- it.Before(func() {
- err := os.WriteFile(filepath.Join(buildpackDir, "buildpack.toml"), []byte(`
- api = "0.2"
-
- [buildpack]
- id = "some-buildpack"
- name = "Some Buildpack"
- version = "some-buildpack-version"
-
- [metadata]
- include-files = ["buildpack.toml"]
-
- [[metadata.dependencies]]
- cpe = "node-cpe"
- purl = "some-purl"
- id = "node"
- name = "Node Engine"
- licenses = ["MIT", "MIT-2"]
- sha256 = "some-sha"
- source = "some-source"
- source_sha256 = "some-source-sha"
- stacks = ["io.buildpacks.stacks.bionic"]
- uri = "some-dep-uri"
- version = "2.2.3"
-
- [[metadata.dependency-constraints]]
- constraint = "2.2.*"
- id = "node"
- patches = 3
-
- [[stacks]]
- id = "io.buildpacks.stacks.bionic"
- `), 0644)
-
- Expect(err).ToNot(HaveOccurred())
- })
- it.After(func() {
- Expect(os.RemoveAll(buildpackDir)).To(Succeed())
- })
-
- it("updates the buildpack.toml dependencies with as many as are available", func() {
- command := exec.Command(
- path,
- "update-dependencies",
- "--buildpack-file", filepath.Join(buildpackDir, "buildpack.toml"),
- "--api", server.URL,
- )
-
- buffer := gbytes.NewBuffer()
- session, err := gexec.Start(command, buffer, buffer)
- Expect(err).NotTo(HaveOccurred())
-
- Eventually(session).Should(gexec.Exit(0), func() string { return string(buffer.Contents()) })
-
- buildpackContents, err := os.ReadFile(filepath.Join(buildpackDir, "buildpack.toml"))
- Expect(err).NotTo(HaveOccurred())
- Expect(string(buildpackContents)).To(MatchTOML(`
-api = "0.2"
-
-[buildpack]
- id = "some-buildpack"
- name = "Some Buildpack"
- version = "some-buildpack-version"
-
-[metadata]
- include-files = ["buildpack.toml"]
-
-[[metadata.dependencies]]
- cpe = "node-cpe"
- purl = "some-purl"
- id = "node"
- licenses = ["MIT", "MIT-2"]
- name = "Node Engine"
- sha256 = "some-sha"
- source = "some-source"
- source_sha256 = "some-source-sha"
- stacks = ["io.buildpacks.stacks.bionic"]
- uri = "some-dep-uri"
- version = "2.2.5"
-
-[[metadata.dependency-constraints]]
- constraint = "2.2.*"
- id = "node"
- patches = 3
-
-[[stacks]]
- id = "io.buildpacks.stacks.bionic"
- `))
- })
- })
-
- context("failure cases", func() {
- context("the --buildpack-file flag is missing", func() {
- it("prints an error and exits non-zero", func() {
- command := exec.Command(
- path,
- "update-dependencies",
- "--api", server.URL,
- )
-
- buffer := gbytes.NewBuffer()
- session, err := gexec.Start(command, buffer, buffer)
- Expect(err).NotTo(HaveOccurred())
-
- Eventually(session).Should(gexec.Exit(1), func() string { return string(buffer.Contents()) })
- Expect(string(buffer.Contents())).To(ContainSubstring("Error: required flag(s) \"buildpack-file\" not set"))
- })
- })
-
- context("the buildpack file does not exist", func() {
- it("prints an error and exits non-zero", func() {
- command := exec.Command(
- path,
- "update-dependencies",
- "--buildpack-file", "/no/such/file",
- "--api", server.URL,
- )
-
- buffer := gbytes.NewBuffer()
- session, err := gexec.Start(command, buffer, buffer)
- Expect(err).NotTo(HaveOccurred())
-
- Eventually(session).Should(gexec.Exit(1), func() string { return string(buffer.Contents()) })
- Expect(string(buffer.Contents())).To(ContainSubstring("failed to parse buildpack.toml"))
- })
- })
-
- context("the dependencies cannot be retrieved from the server", func() {
- it("prints an error and exits non-zero", func() {
- command := exec.Command(
- path,
- "update-dependencies",
- "--buildpack-file", filepath.Join(buildpackDir, "buildpack.toml"),
- "--api", "%%%",
- )
-
- buffer := gbytes.NewBuffer()
- session, err := gexec.Start(command, buffer, buffer)
- Expect(err).NotTo(HaveOccurred())
-
- Eventually(session).Should(gexec.Exit(1), func() string { return string(buffer.Contents()) })
- Expect(string(buffer.Contents())).To(ContainSubstring("failed to query url"))
- })
- })
-
- context("the server status code is not 200", func() {
- it.Before(func() {
- err := os.WriteFile(filepath.Join(buildpackDir, "buildpack.toml"), []byte(`
- api = "0.2"
-
- [buildpack]
- id = "some-buildpack"
- name = "Some Buildpack"
- version = "some-buildpack-version"
-
- [metadata]
- include-files = ["buildpack.toml"]
-
- [[metadata.dependencies]]
- cpe = "non-existent-cpe"
- purl = "non-existent-purl"
- id = "non-existent"
- licenses = ["MIT", "MIT-2"]
- sha256 = "some-sha"
- source = "some-source"
- source_sha256 = "some-source-sha"
- stacks = ["io.buildpacks.stacks.bionic"]
- uri = "some-dep-uri"
- version = "1.2.3"
-
- [[metadata.dependency-constraints]]
- constraint = "1.*"
- id = "non-existent"
- patches = 1
-
- [[stacks]]
- id = "io.buildpacks.stacks.bionic"
- `), 0644)
- Expect(err).NotTo(HaveOccurred())
- })
- it("prints an error and exits non-zero", func() {
- command := exec.Command(
- path,
- "update-dependencies",
- "--buildpack-file", filepath.Join(buildpackDir, "buildpack.toml"),
- "--api", server.URL,
- )
-
- buffer := gbytes.NewBuffer()
- session, err := gexec.Start(command, buffer, buffer)
- Expect(err).NotTo(HaveOccurred())
-
- Eventually(session).Should(gexec.Exit(1), func() string { return string(buffer.Contents()) })
- Expect(string(buffer.Contents())).To(ContainSubstring(fmt.Sprintf("failed to query url %s/v1/dependency?name=non-existent with: status code 500", server.URL)))
- })
- })
- context("when the buildpack file cannot be opened", func() {
- it.Before(func() {
- Expect(os.Chmod(filepath.Join(buildpackDir, "buildpack.toml"), 0400)).To(Succeed())
- })
- it("prints an error and exits non-zero", func() {
- command := exec.Command(
- path,
- "update-dependencies",
- "--buildpack-file", filepath.Join(buildpackDir, "buildpack.toml"),
- "--api", server.URL,
- )
-
- buffer := gbytes.NewBuffer()
- session, err := gexec.Start(command, buffer, buffer)
- Expect(err).NotTo(HaveOccurred())
-
- Eventually(session).Should(gexec.Exit(1), func() string { return string(buffer.Contents()) })
- Expect(string(buffer.Contents())).To(ContainSubstring("failed to open buildpack config"))
- })
- })
- })
-}
diff --git a/go.mod b/go.mod
index 3d261cfa..24c41250 100644
--- a/go.mod
+++ b/go.mod
@@ -6,14 +6,14 @@ require (
github.com/BurntSushi/toml v0.4.1
github.com/Masterminds/semver/v3 v3.1.1
github.com/cheggaaa/pb/v3 v3.0.8
- github.com/docker/distribution v2.7.1+incompatible
github.com/dsnet/compress v0.0.1
github.com/gabriel-vasile/mimetype v1.3.1
- github.com/google/go-containerregistry v0.6.0
+ github.com/kr/text v0.2.0 // indirect
+ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
github.com/onsi/gomega v1.16.0
- github.com/pelletier/go-toml v1.9.3
github.com/sclevine/spec v1.4.0
- github.com/spf13/cobra v1.2.1
github.com/ulikunitz/xz v0.5.10
+ golang.org/x/net v0.0.0-20210525063256-abc453219eb5 // indirect
+ golang.org/x/sys v0.0.0-20210603125802-9665404d3644 // indirect
gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b // indirect
)
diff --git a/go.sum b/go.sum
index 39823476..2f59570e 100644
--- a/go.sum
+++ b/go.sum
@@ -1,1228 +1,136 @@
-bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8=
-cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
-cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
-cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
-cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU=
-cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=
-cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc=
-cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0=
-cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To=
-cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4=
-cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M=
-cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc=
-cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk=
-cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs=
-cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc=
-cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY=
-cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI=
-cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk=
-cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg=
-cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8=
-cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0=
-cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY=
-cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
-cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=
-cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=
-cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg=
-cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc=
-cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ=
-cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
-cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=
-cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk=
-cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=
-cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw=
-cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA=
-cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU=
-cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=
-cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos=
-cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=
-cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
-cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
-dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
-github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
-github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8=
-github.com/Azure/go-autorest v10.8.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
-github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
-github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw=
-github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg=
-github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A=
-github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74=
-github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k=
-github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k=
-github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8=
-github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU=
-github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/toml v0.4.1 h1:GaI7EiDXDRfa8VshkTj7Fym7ha+y8/XxIgD2okUIjLw=
github.com/BurntSushi/toml v0.4.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
-github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc=
github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
-github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA=
-github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA=
-github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw=
-github.com/Microsoft/go-winio v0.4.16-0.20201130162521-d1ffc52c7331/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0=
-github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0=
-github.com/Microsoft/go-winio v0.4.17-0.20210211115548-6eac466e5fa3/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84=
-github.com/Microsoft/go-winio v0.4.17-0.20210324224401-5516f17a5958/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84=
-github.com/Microsoft/go-winio v0.4.17/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84=
-github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84=
-github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg=
-github.com/Microsoft/hcsshim v0.8.7-0.20190325164909-8abdbb8205e4/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg=
-github.com/Microsoft/hcsshim v0.8.7/go.mod h1:OHd7sQqRFrYd3RmSgbgji+ctCwkbq2wbEYNSzOYtcBQ=
-github.com/Microsoft/hcsshim v0.8.9/go.mod h1:5692vkUqntj1idxauYlpoINNKeqCiG6Sg38RRsjT5y8=
-github.com/Microsoft/hcsshim v0.8.14/go.mod h1:NtVKoYxQuTLx6gEq0L96c9Ju4JbRJ4nY2ow3VK6a9Lg=
-github.com/Microsoft/hcsshim v0.8.15/go.mod h1:x38A4YbHbdxJtc0sF6oIz+RG0npwSCAvn69iY6URG00=
-github.com/Microsoft/hcsshim v0.8.16/go.mod h1:o5/SZqmR7x9JNKsW3pu+nqHm0MF8vbA+VxGOoXdC600=
-github.com/Microsoft/hcsshim/test v0.0.0-20201218223536-d3e5debf77da/go.mod h1:5hlzMzRKMLyo42nCZ9oml8AdTlq/0cvIaBv6tK1RehU=
-github.com/Microsoft/hcsshim/test v0.0.0-20210227013316-43a75bb4edd3/go.mod h1:mw7qgWloBUl75W/gVH3cQszUg1+gUITj7D6NY7ywVnY=
-github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
-github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
-github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
-github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
-github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ=
github.com/VividCortex/ewma v1.1.1 h1:MnEK4VOv6n0RSY4vtRe3h11qjxL3+t0B8yOL8iMXdcM=
github.com/VividCortex/ewma v1.1.1/go.mod h1:2Tkkvm3sRDVXaiyucHiACn4cqf7DpdyLvmxzcbUokwA=
-github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
-github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
-github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
-github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
-github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:CgnQgUtFrFz9mxFNtED3jI5tLDjKlOM+oUF/sTk6ps0=
-github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
-github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
-github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
-github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
-github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
-github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
-github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0=
-github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
-github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
-github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
-github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
-github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
-github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA=
-github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM=
-github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
-github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
-github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4=
-github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk=
-github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s=
-github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8=
-github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50=
-github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE=
-github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
-github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
-github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
-github.com/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw=
github.com/cheggaaa/pb/v3 v3.0.8 h1:bC8oemdChbke2FHIIGy9mn4DPJ2caZYQnfbRqwmdCoA=
github.com/cheggaaa/pb/v3 v3.0.8/go.mod h1:UICbiLec/XO6Hw6k+BHEtHeQFzzBH4i2/qk/ow1EJTA=
-github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
-github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
-github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
-github.com/cilium/ebpf v0.0.0-20200110133405-4032b1d8aae3/go.mod h1:MA5e5Lr8slmEg9bt0VpxxWqJlO4iwu3FBdHUzV7wQVg=
-github.com/cilium/ebpf v0.0.0-20200702112145-1c8d4c9ef775/go.mod h1:7cR51M8ViRLIdUjrmSXlK9pkrsDlLHbO8jiB8X8JnOc=
-github.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX2Qs=
-github.com/cilium/ebpf v0.4.0/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs=
-github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
-github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
-github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
-github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
-github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
-github.com/containerd/aufs v0.0.0-20200908144142-dab0cbea06f4/go.mod h1:nukgQABAEopAHvB6j7cnP5zJ+/3aVcE7hCYqvIwAHyE=
-github.com/containerd/aufs v0.0.0-20201003224125-76a6863f2989/go.mod h1:AkGGQs9NM2vtYHaUen+NljV0/baGCAPELGm2q9ZXpWU=
-github.com/containerd/aufs v0.0.0-20210316121734-20793ff83c97/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU=
-github.com/containerd/aufs v1.0.0/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU=
-github.com/containerd/btrfs v0.0.0-20201111183144-404b9149801e/go.mod h1:jg2QkJcsabfHugurUvvPhS3E08Oxiuh5W/g1ybB4e0E=
-github.com/containerd/btrfs v0.0.0-20210316141732-918d888fb676/go.mod h1:zMcX3qkXTAi9GI50+0HOeuV8LU2ryCE/V2vG/ZBiTss=
-github.com/containerd/btrfs v1.0.0/go.mod h1:zMcX3qkXTAi9GI50+0HOeuV8LU2ryCE/V2vG/ZBiTss=
-github.com/containerd/cgroups v0.0.0-20190717030353-c4b9ac5c7601/go.mod h1:X9rLEHIqSf/wfK8NsPqxJmeZgW4pcfzdXITDrUSJ6uI=
-github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko=
-github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59/go.mod h1:pA0z1pT8KYB3TCXK/ocprsh7MAkoW8bZVzPdih9snmM=
-github.com/containerd/cgroups v0.0.0-20200710171044-318312a37340/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo=
-github.com/containerd/cgroups v0.0.0-20200824123100-0b889c03f102/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo=
-github.com/containerd/cgroups v0.0.0-20210114181951-8a68de567b68/go.mod h1:ZJeTFisyysqgcCdecO57Dj79RfL0LNeGiFUqLYQRYLE=
-github.com/containerd/cgroups v1.0.1/go.mod h1:0SJrPIenamHDcZhEcJMNBB85rHcUsw4f25ZfBiPYRkU=
-github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw=
-github.com/containerd/console v0.0.0-20181022165439-0650fd9eeb50/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw=
-github.com/containerd/console v0.0.0-20191206165004-02ecf6a7291e/go.mod h1:8Pf4gM6VEbTNRIT26AyyU7hxdQU3MvAvxVI0sc00XBE=
-github.com/containerd/console v1.0.1/go.mod h1:XUsP6YE/mKtz6bxc+I8UiKKTP04qjQL4qcS3XoQ5xkw=
-github.com/containerd/console v1.0.2/go.mod h1:ytZPjGgY2oeTkAONYafi2kSj0aYggsf8acV1PGKCbzQ=
-github.com/containerd/containerd v1.2.10/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
-github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
-github.com/containerd/containerd v1.3.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
-github.com/containerd/containerd v1.3.1-0.20191213020239-082f7e3aed57/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
-github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
-github.com/containerd/containerd v1.4.0-beta.2.0.20200729163537-40b22ef07410/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
-github.com/containerd/containerd v1.4.1/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
-github.com/containerd/containerd v1.4.3/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
-github.com/containerd/containerd v1.5.0-beta.1/go.mod h1:5HfvG1V2FsKesEGQ17k5/T7V960Tmcumvqn8Mc+pCYQ=
-github.com/containerd/containerd v1.5.0-beta.3/go.mod h1:/wr9AVtEM7x9c+n0+stptlo/uBBoBORwEx6ardVcmKU=
-github.com/containerd/containerd v1.5.0-beta.4/go.mod h1:GmdgZd2zA2GYIBZ0w09ZvgqEq8EfBp/m3lcVZIvPHhI=
-github.com/containerd/containerd v1.5.0-rc.0/go.mod h1:V/IXoMqNGgBlabz3tHD2TWDoTJseu1FGOKuoA4nNb2s=
-github.com/containerd/containerd v1.5.2/go.mod h1:0DOxVqwDy2iZvrZp2JUx/E+hS0UNTVn7dJnIOwtYR4g=
-github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y=
-github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y=
-github.com/containerd/continuity v0.0.0-20191127005431-f65d91d395eb/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y=
-github.com/containerd/continuity v0.0.0-20200710164510-efbc4488d8fe/go.mod h1:cECdGN1O8G9bgKTlLhuPJimka6Xb/Gg7vYzCTNVxhvo=
-github.com/containerd/continuity v0.0.0-20201208142359-180525291bb7/go.mod h1:kR3BEg7bDFaEddKm54WSmrol1fKWDU1nKYkgrcgZT7Y=
-github.com/containerd/continuity v0.0.0-20210208174643-50096c924a4e/go.mod h1:EXlVlkqNba9rJe3j7w3Xa924itAMLgZH4UD/Q4PExuQ=
-github.com/containerd/continuity v0.1.0/go.mod h1:ICJu0PwR54nI0yPEnJ6jcS+J7CZAUXrLh8lPo2knzsM=
-github.com/containerd/fifo v0.0.0-20180307165137-3d5202aec260/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI=
-github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI=
-github.com/containerd/fifo v0.0.0-20200410184934-f15a3290365b/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0=
-github.com/containerd/fifo v0.0.0-20201026212402-0724c46b320c/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0=
-github.com/containerd/fifo v0.0.0-20210316144830-115abcc95a1d/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4=
-github.com/containerd/fifo v1.0.0/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4=
-github.com/containerd/go-cni v1.0.1/go.mod h1:+vUpYxKvAF72G9i1WoDOiPGRtQpqsNW/ZHtSlv++smU=
-github.com/containerd/go-cni v1.0.2/go.mod h1:nrNABBHzu0ZwCug9Ije8hL2xBCYh/pjfMb1aZGrrohk=
-github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0=
-github.com/containerd/go-runc v0.0.0-20190911050354-e029b79d8cda/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0=
-github.com/containerd/go-runc v0.0.0-20200220073739-7016d3ce2328/go.mod h1:PpyHrqVs8FTi9vpyHwPwiNEGaACDxT/N/pLcvMSRA9g=
-github.com/containerd/go-runc v0.0.0-20201020171139-16b287bc67d0/go.mod h1:cNU0ZbCgCQVZK4lgG3P+9tn9/PaJNmoDXPpoJhDR+Ok=
-github.com/containerd/go-runc v1.0.0/go.mod h1:cNU0ZbCgCQVZK4lgG3P+9tn9/PaJNmoDXPpoJhDR+Ok=
-github.com/containerd/imgcrypt v1.0.1/go.mod h1:mdd8cEPW7TPgNG4FpuP3sGBiQ7Yi/zak9TYCG3juvb0=
-github.com/containerd/imgcrypt v1.0.4-0.20210301171431-0ae5c75f59ba/go.mod h1:6TNsg0ctmizkrOgXRNQjAPFWpMYRWuiB6dSF4Pfa5SA=
-github.com/containerd/imgcrypt v1.1.1-0.20210312161619-7ed62a527887/go.mod h1:5AZJNI6sLHJljKuI9IHnw1pWqo/F0nGDOuR9zgTs7ow=
-github.com/containerd/imgcrypt v1.1.1/go.mod h1:xpLnwiQmEUJPvQoAapeb2SNCxz7Xr6PJrXQb0Dpc4ms=
-github.com/containerd/nri v0.0.0-20201007170849-eb1350a75164/go.mod h1:+2wGSDGFYfE5+So4M5syatU0N0f0LbWpuqyMi4/BE8c=
-github.com/containerd/nri v0.0.0-20210316161719-dbaa18c31c14/go.mod h1:lmxnXF6oMkbqs39FiCt1s0R2HSMhcLel9vNL3m4AaeY=
-github.com/containerd/nri v0.1.0/go.mod h1:lmxnXF6oMkbqs39FiCt1s0R2HSMhcLel9vNL3m4AaeY=
-github.com/containerd/stargz-snapshotter/estargz v0.7.0 h1:1d/rydzTywc76lnjJb6qbPCiTiCwts49AzKps/Ecblw=
-github.com/containerd/stargz-snapshotter/estargz v0.7.0/go.mod h1:83VWDqHnurTKliEB0YvWMiCfLDwv4Cjj1X9Vk98GJZw=
-github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o=
-github.com/containerd/ttrpc v0.0.0-20190828172938-92c8520ef9f8/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o=
-github.com/containerd/ttrpc v0.0.0-20191028202541-4f1b8fe65a5c/go.mod h1:LPm1u0xBw8r8NOKoOdNMeVHSawSsltak+Ihv+etqsE8=
-github.com/containerd/ttrpc v1.0.1/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y=
-github.com/containerd/ttrpc v1.0.2/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y=
-github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc=
-github.com/containerd/typeurl v0.0.0-20190911142611-5eb25027c9fd/go.mod h1:GeKYzf2pQcqv7tJ0AoCuuhtnqhva5LNU3U+OyKxxJpk=
-github.com/containerd/typeurl v1.0.1/go.mod h1:TB1hUtrpaiO88KEK56ijojHS1+NeF0izUACaJW2mdXg=
-github.com/containerd/typeurl v1.0.2/go.mod h1:9trJWW2sRlGub4wZJRTW83VtbOLS6hwcDZXTn6oPz9s=
-github.com/containerd/zfs v0.0.0-20200918131355-0a33824f23a2/go.mod h1:8IgZOBdv8fAgXddBT4dBXJPtxyRsejFIpXoklgxgEjw=
-github.com/containerd/zfs v0.0.0-20210301145711-11e8f1707f62/go.mod h1:A9zfAbMlQwE+/is6hi0Xw8ktpL+6glmqZYtevJgaB8Y=
-github.com/containerd/zfs v0.0.0-20210315114300-dde8f0fda960/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY=
-github.com/containerd/zfs v0.0.0-20210324211415-d5c4544f0433/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY=
-github.com/containerd/zfs v1.0.0/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY=
-github.com/containernetworking/cni v0.7.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY=
-github.com/containernetworking/cni v0.8.0/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY=
-github.com/containernetworking/cni v0.8.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY=
-github.com/containernetworking/plugins v0.8.6/go.mod h1:qnw5mN19D8fIwkqW7oHHYDHVlzhJpcY6TQxn/fUyDDM=
-github.com/containernetworking/plugins v0.9.1/go.mod h1:xP/idU2ldlzN6m4p5LmGiwRDjeJr6FLK6vuiUwoH7P8=
-github.com/containers/ocicrypt v1.0.1/go.mod h1:MeJDzk1RJHv89LjsH0Sp5KTY3ZYkjXO/C+bKAeWFIrc=
-github.com/containers/ocicrypt v1.1.0/go.mod h1:b8AOe0YR67uU8OqfVNcznfFpAzu3rdgUV4GP9qXPfu4=
-github.com/containers/ocicrypt v1.1.1/go.mod h1:Dm55fwWm1YZAjYRaJ94z2mfZikIyIN4B0oB3dj3jFxY=
-github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
-github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
-github.com/coreos/go-iptables v0.4.5/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU=
-github.com/coreos/go-iptables v0.5.0/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU=
-github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc=
-github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
-github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
-github.com/coreos/go-systemd v0.0.0-20161114122254-48702e0da86b/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
-github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
-github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
-github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk=
-github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk=
-github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
-github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
-github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
-github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
-github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
-github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
-github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4=
-github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1SMSibvLzxjeJLnrYEVLULFNiHY9YfQ=
-github.com/d2g/dhcp4client v1.0.0/go.mod h1:j0hNfjhrt2SxUOw55nL0ATM/z4Yt3t2Kd1mW34z5W5s=
-github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5/go.mod h1:Eo87+Kg/IX2hfWJfwxMzLyuSZyxSoAug2nGa1G2QAi8=
-github.com/d2g/hardwareaddr v0.0.0-20190221164911-e7d9fbe030e4/go.mod h1:bMl4RjIciD2oAxI7DmWRx6gbeqrkoLqv3MV0vzNad+I=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0=
-github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
-github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
-github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
-github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E=
-github.com/docker/cli v20.10.7+incompatible h1:pv/3NqibQKphWZiAskMzdz8w0PRbtTaEB+f6NwdU7Is=
-github.com/docker/cli v20.10.7+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
-github.com/docker/distribution v0.0.0-20190905152932-14b96e55d84c/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY=
-github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
-github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug=
-github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
-github.com/docker/docker v20.10.7+incompatible h1:Z6O9Nhsjv+ayUEeI1IojKbYcsGdgYSNqxe1s2MYzUhQ=
-github.com/docker/docker v20.10.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
-github.com/docker/docker-credential-helpers v0.6.3 h1:zI2p9+1NQYdnG6sMU26EX4aVGlqbInSQxQXLvzJ4RPQ=
-github.com/docker/docker-credential-helpers v0.6.3/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y=
-github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
-github.com/docker/go-events v0.0.0-20170721190031-9461782956ad/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA=
-github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA=
-github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916/go.mod h1:/u0gXw0Gay3ceNrsHubL3BtdOL2fHf93USgMTe0W5dI=
-github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw=
-github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
-github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE=
-github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM=
-github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE=
github.com/dsnet/compress v0.0.1 h1:PlZu0n3Tuv04TzpfPbrnI0HW/YwodEXDS+oPKahKF0Q=
github.com/dsnet/compress v0.0.1/go.mod h1:Aw8dCMJ7RioblQeTqt88akK31OvO8Dhf5JflhBbQEHo=
github.com/dsnet/golib v0.0.0-20171103203638-1ea166775780/go.mod h1:Lj+Z9rebOhdfkVLjJ8T6VcRQv3SXugXy999NBtR9aFY=
-github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
-github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
-github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=
-github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
-github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
-github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
-github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
-github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
-github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po=
-github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
-github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
-github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
-github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
-github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg=
github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM=
-github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
-github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
-github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA=
github.com/gabriel-vasile/mimetype v1.3.1 h1:qevA6c2MtE1RorlScnixeG0VA1H4xrXyhyX3oWBynNQ=
github.com/gabriel-vasile/mimetype v1.3.1/go.mod h1:fA8fi6KUiG7MgQQ+mEWotXoEOvmxRtOJlERCzSmRvr8=
-github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY=
-github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
-github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
-github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
-github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
-github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
-github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8=
-github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
-github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
-github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
-github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
-github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas=
-github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU=
-github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg=
-github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
-github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc=
-github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8=
-github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo=
-github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
-github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
-github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
-github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw=
-github.com/godbus/dbus v0.0.0-20180201030542-885f9cc04c9c/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw=
-github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4=
-github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
-github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
-github.com/gogo/googleapis v1.2.0/go.mod h1:Njal3psf3qN6dwBtQfUmBZh2ybovJ0tlu3o/AC7HYjU=
-github.com/gogo/googleapis v1.4.0/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c=
-github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
-github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
-github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
-github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
-github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
-github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
-github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
-github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
-github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
-github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
-github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
-github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
-github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
-github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
-github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=
-github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
-github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
-github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
-github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
-github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
-github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
-github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
-github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
-github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
-github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
-github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
-github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
-github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
-github.com/golang/snappy v0.0.3 h1:fHPg5GQYlCeLIPB9BZqMVR5nR9A+IM5zcgeTdjMYmLA=
-github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
-github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
-github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
-github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ=
-github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-containerregistry v0.6.0 h1:niQ+8XD//kKgArIFwDVBXsWVWbde16LPdHMyNwSC8h4=
-github.com/google/go-containerregistry v0.6.0/go.mod h1:euCCtNbZ6tKqi1E72vwDj2xZcN5ttKpZLfa/wSo5iLw=
-github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
-github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
-github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
-github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
-github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
-github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk=
-github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
-github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
-github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
-github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
-github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
-github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
-github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
-github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
-github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
-github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
-github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
-github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
-github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
-github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
-github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
-github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
-github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
-github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
-github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
-github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg=
-github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
-github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ=
-github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
-github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
-github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
-github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
-github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
-github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
-github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
-github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
-github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
-github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
-github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
-github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
-github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q=
-github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=
-github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
-github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
-github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
-github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
-github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
-github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I=
-github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
-github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU=
-github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU=
-github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4=
-github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
-github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
-github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90=
-github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
-github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
-github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
-github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
-github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
-github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
-github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
-github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
-github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
-github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
-github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
-github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
-github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
-github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
-github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
-github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA=
-github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
-github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
-github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
-github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
-github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
-github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
-github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
-github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
-github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
-github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
-github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
-github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
-github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
-github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
-github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
-github.com/klauspost/compress v1.11.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
-github.com/klauspost/compress v1.11.13/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
-github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg=
-github.com/klauspost/compress v1.13.0 h1:2T7tUoQrQT+fQWdaY5rjWztFGAFwbGD04iPJg90ZiOs=
-github.com/klauspost/compress v1.13.0/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg=
github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
-github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
-github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
-github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
-github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
-github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
-github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
-github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
-github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
-github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
-github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
-github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
-github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
-github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
-github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs=
-github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho=
-github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8=
github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
-github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
-github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
-github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
github.com/mattn/go-runewidth v0.0.12 h1:Y41i/hVW3Pgwr8gV+J23B9YEY0zxjptBuCWEaxmAOow=
github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk=
-github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o=
-github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
-github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
-github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
-github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs=
-github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4=
-github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
-github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
-github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
-github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
-github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg=
-github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=
-github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
-github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
-github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
-github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A=
-github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc=
-github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A=
-github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A=
-github.com/moby/sys/symlink v0.1.0/go.mod h1:GGDODQmbFOjFsXvfLVn3+ZRxkch54RkSiGqsZeMYowQ=
-github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo=
-github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
-github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
-github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
-github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
-github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
-github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ=
-github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
-github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
-github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
-github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
-github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
-github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
-github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
-github.com/onsi/ginkgo v0.0.0-20151202141238-7f8ab55aaf3b/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
-github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
-github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
-github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
-github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc=
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
-github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
-github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
-github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
-github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc=
github.com/onsi/gomega v1.16.0 h1:6gjqkI8iiRHMvdccRJM8rVKjCWk6ZIm6FTm3ddIe4/c=
github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
-github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
-github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
-github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
-github.com/opencontainers/go-digest v1.0.0-rc1.0.20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
-github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
-github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
-github.com/opencontainers/image-spec v1.0.0/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
-github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI=
-github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
-github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
-github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
-github.com/opencontainers/runc v1.0.0-rc8.0.20190926000215-3e425f80a8c9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
-github.com/opencontainers/runc v1.0.0-rc9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
-github.com/opencontainers/runc v1.0.0-rc93/go.mod h1:3NOsor4w32B2tC0Zbl8Knk4Wg84SM2ImC1fxBuqJ/H0=
-github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
-github.com/opencontainers/runtime-spec v1.0.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
-github.com/opencontainers/runtime-spec v1.0.2-0.20190207185410-29686dbc5559/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
-github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
-github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
-github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs=
-github.com/opencontainers/selinux v1.6.0/go.mod h1:VVGKuOLlE7v4PJyT6h7mNWvq1rzqiriPsEqVhc+svHE=
-github.com/opencontainers/selinux v1.8.0/go.mod h1:RScLhm78qiWa2gbVCcGkC7tCGdgk3ogry1nUQF8Evvo=
-github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
-github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
-github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc=
-github.com/pelletier/go-toml v1.9.3 h1:zeC5b1GviRUyKYd6OJPvBU/mcVDVoL1OhT17FCt5dSQ=
-github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
-github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=
-github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
-github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
-github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
-github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
-github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
-github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
-github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA=
-github.com/prometheus/client_golang v0.0.0-20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
-github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
-github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso=
-github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
-github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g=
-github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=
-github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
-github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
-github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
-github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
-github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
-github.com/prometheus/common v0.0.0-20180110214958-89604d197083/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
-github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
-github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
-github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
-github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc=
-github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
-github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
-github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
-github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
-github.com/prometheus/procfs v0.0.0-20190522114515-bc1a522cf7b1/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
-github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
-github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ=
-github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ=
-github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A=
-github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
-github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
-github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
-github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
-github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
-github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
-github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
-github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
-github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
-github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
-github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4=
-github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM=
-github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
-github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo=
-github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
-github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
-github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
-github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
-github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
-github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
-github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
-github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
-github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
-github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
-github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
-github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
-github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
-github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
-github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
-github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
-github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
-github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I=
-github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
-github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
-github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
-github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
-github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE=
-github.com/spf13/cobra v1.2.1 h1:+KmjbUw1hriSNMF55oPrkZcb27aECyrj8V2ytv7kWDw=
-github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk=
-github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
-github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=
-github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
-github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
-github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
-github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
-github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
-github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
-github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE=
-github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns=
-github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8=
-github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
-github.com/stretchr/testify v0.0.0-20180303142811-b89eecf5ca5d/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
-github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
-github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
-github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
-github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
-github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
-github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
-github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
-github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
-github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
-github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
-github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I=
-github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
-github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
-github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc=
github.com/ulikunitz/xz v0.5.6/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8=
github.com/ulikunitz/xz v0.5.10 h1:t92gobL9l3HE202wg3rlk19F6X+JOxl9BBrCCMYEYd8=
github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
-github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
-github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
-github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
-github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
-github.com/vishvananda/netlink v0.0.0-20181108222139-023a6dafdcdf/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk=
-github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE=
-github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho=
-github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc/go.mod h1:ZjcWmFBXmLKZu9Nxj3WKYEafiSqer2rnvPr0en9UNpI=
-github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU=
-github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0=
-github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4=
-github.com/willf/bitset v1.1.11/go.mod h1:83CECat5yLh5zVOf4P1ErAgKA5UDvKtgyUABdr3+MjI=
-github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
-github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ=
-github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs=
-github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
-github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
-github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
-github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
-github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
-github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
-github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs=
-github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA=
-github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg=
-go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
-go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
-go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
-go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg=
-go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs=
-go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g=
-go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ=
-go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk=
-go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
-go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
-go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
-go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
-go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
-go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
-go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
-go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
-go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
-go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
-go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
-go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
-go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
-go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
-golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
-golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
-golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
-golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
-golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
-golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
-golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
-golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
-golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
-golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
-golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek=
-golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY=
-golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
-golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
-golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
-golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
-golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
-golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
-golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
-golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
-golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
-golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
-golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
-golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
-golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
-golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
-golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=
-golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
-golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
-golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
-golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
-golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
-golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
-golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
-golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
-golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
-golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
-golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
-golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
-golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
-golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
-golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
-golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
-golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20190619014844-b5b0513f8c1b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
-golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
-golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
-golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
-golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
-golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
-golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
-golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
-golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
-golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
-golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
-golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
-golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
-golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
-golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
-golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc=
-golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
-golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210525063256-abc453219eb5 h1:wjuX4b5yYQnEQHzd+CBcrcC6OVR2J1CN6mUy0oSxIPo=
golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
-golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
-golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
-golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
-golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
-golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
-golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
-golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
-golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
-golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
-golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
-golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
-golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
-golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190522044717-8097e1b27ff5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190812073006-9eafafc0a87e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20191210023423-ac6580df4449/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200120151820-655fe14d7479/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200217220822-9197077df867/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200817155316-9781c653f443/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200916030750-2334cc1a136f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200922070232-aee5d888a860/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20201117170446-d9b008d0a637/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20201202213521-69691e467435/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210603125802-9665404d3644 h1:CA1DEQ4NdKphKeL70tvsWNdT5oFh1lOjihRcEDROi0I=
golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
-golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
-golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
-golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
-golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
-golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
-golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
-golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
-golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
-golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
-golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
-golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
-golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
-golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
-golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
-golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
-golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
-golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
-golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
-golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
-golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
-golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=
-golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
-golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
-golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
-golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
-golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
-golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
-golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
-golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
-golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE=
-golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
-golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
-golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
-golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
-golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
-golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
-golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
-golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0=
-google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
-google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
-google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
-google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
-google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
-google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
-google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
-google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
-google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
-google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
-google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
-google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
-google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
-google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
-google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM=
-google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc=
-google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg=
-google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE=
-google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8=
-google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU=
-google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94=
-google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8=
-google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo=
-google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
-google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
-google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
-google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
-google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
-google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
-google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
-google.golang.org/cloud v0.0.0-20151119220103-975617b05ea8/go.mod h1:0H1ncTHf11KCFhTc/+EFRbzSCOZx+VUbRMk55Yv5MYk=
-google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
-google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
-google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
-google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
-google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
-google.golang.org/genproto v0.0.0-20190522204451-c2c4e71fbf69/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s=
-google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
-google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
-google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=
-google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
-google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
-google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
-google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
-google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
-google.golang.org/genproto v0.0.0-20200117163144-32f20d992d24/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
-google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
-google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA=
-google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U=
-google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
-google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=
-google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A=
-google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A=
-google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
-google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
-google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
-google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
-google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
-google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
-google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
-google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
-google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA=
-google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
-google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
-google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
-google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
-google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=
-google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
-google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
-google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
-google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
-google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
-google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
-google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8=
-google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
-google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
-google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
-google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
-google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
-google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
-google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
-google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
-google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
-google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
-google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
-gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U=
-gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/check.v1 v1.0.0-20141024133853-64131543e789/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b h1:QRR6H1YWRnHb4Y/HeNFCTJLFVxaq6wH4YuVdsUOr75U=
gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
-gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
-gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo=
-gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
-gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
-gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
-gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
-gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
-gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
-gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
-gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
-gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
-gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
-gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
-gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
-gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo=
-gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
-gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk=
-gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0=
-gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8=
-honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
-honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
-honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
-honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
-honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
-honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
-honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
-k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo=
-k8s.io/api v0.20.4/go.mod h1:++lNL1AJMkDymriNniQsWRkMDzRaX2Y/POTUi8yvqYQ=
-k8s.io/api v0.20.6/go.mod h1:X9e8Qag6JV/bL5G6bU8sdVRltWKmdHsFUGS3eVndqE8=
-k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU=
-k8s.io/apimachinery v0.20.4/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU=
-k8s.io/apimachinery v0.20.6/go.mod h1:ejZXtW1Ra6V1O5H8xPBGz+T3+4gfkTCeExAHKU57MAc=
-k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU=
-k8s.io/apiserver v0.20.4/go.mod h1:Mc80thBKOyy7tbvFtB4kJv1kbdD0eIH8k8vianJcbFM=
-k8s.io/apiserver v0.20.6/go.mod h1:QIJXNt6i6JB+0YQRNcS0hdRHJlMhflFmsBDeSgT1r8Q=
-k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y=
-k8s.io/client-go v0.20.4/go.mod h1:LiMv25ND1gLUdBeYxBIwKpkSC5IsozMMmOOeSJboP+k=
-k8s.io/client-go v0.20.6/go.mod h1:nNQMnOvEUEsOzRRFIIkdmYOjAZrC8bgq0ExboWSU1I0=
-k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk=
-k8s.io/component-base v0.20.4/go.mod h1:t4p9EdiagbVCJKrQ1RsA5/V4rFQNDfRlevJajlGwgjI=
-k8s.io/component-base v0.20.6/go.mod h1:6f1MPBAeI+mvuts3sIdtpjljHWBQ2cIy38oBIWMYnrM=
-k8s.io/cri-api v0.17.3/go.mod h1:X1sbHmuXhwaHs9xxYffLqJogVsnI+f6cPRcgPel7ywM=
-k8s.io/cri-api v0.20.1/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI=
-k8s.io/cri-api v0.20.4/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI=
-k8s.io/cri-api v0.20.6/go.mod h1:ew44AjNXwyn1s0U4xCKGodU7J1HzBeZ1MpGrpa5r8Yc=
-k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
-k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
-k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=
-k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM=
-k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk=
-k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
-rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
-rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
-rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
-sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg=
-sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg=
-sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=
-sigs.k8s.io/structured-merge-diff/v4 v4.0.3/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=
-sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
-sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
diff --git a/scripts/package.sh b/scripts/package.sh
deleted file mode 100755
index 8fe5073b..00000000
--- a/scripts/package.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/bash
-
-set -e
-set -u
-set -o pipefail
-
-readonly ROOT_DIR="$(cd "$(dirname "${0}")/.." && pwd)"
-readonly ARTIFACTS_DIR="${ROOT_DIR}/build"
-
-function main() {
- mkdir -p "${ARTIFACTS_DIR}"
-
- pushd "${ROOT_DIR}" > /dev/null || return
- for os in darwin linux; do
- echo "* building jam on ${os}"
- GOOS="${os}" GOARCH="amd64" go build -o "${ARTIFACTS_DIR}/jam-${os}" ./cargo/jam/main.go
- chmod +x "${ARTIFACTS_DIR}/jam-${os}"
- done
- echo "* building jam on windows"
- GOOS="windows" go build -o "${ARTIFACTS_DIR}/jam-windows.exe" ./cargo/jam/main.go
- popd > /dev/null || return
-}
-
-main "${@:-}"