Skip to content

Commit

Permalink
Fixes import statement for v2 module
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Moran authored and ryanmoran committed Dec 7, 2021
1 parent 39b9455 commit c810215
Show file tree
Hide file tree
Showing 70 changed files with 112 additions and 112 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# packit

[![GoDoc](https://img.shields.io/badge/pkg.go.dev-doc-blue)](http://pkg.go.dev/github.com/paketo-buildpacks/packit)
[![GoDoc](https://img.shields.io/badge/pkg.go.dev-doc-blue)](http://pkg.go.dev/github.com/paketo-buildpacks/packit/v2)

Package packit provides primitives for implementing a Cloud Native Buildpack
according to the specification:
Expand Down Expand Up @@ -29,7 +29,7 @@ import (
"os"
"path/filepath"

"github.com/paketo-buildpacks/packit"
"github.com/paketo-buildpacks/packit/v2"
)

func main() {
Expand Down Expand Up @@ -103,7 +103,7 @@ application source code.
```go
package main

import "github.com/paketo-buildpacks/packit"
import "github.com/paketo-buildpacks/packit/v2"

func main() {
// The build phase includes the yarn cli in a new layer that is made
Expand Down Expand Up @@ -171,7 +171,7 @@ example that combines a simple detect and build into a single main program.
```go
package main

import "github.com/paketo-buildpacks/packit"
import "github.com/paketo-buildpacks/packit/v2"

func main() {
detect := func(context packit.DetectContext) (packit.DetectResult, error) {
Expand Down
2 changes: 1 addition & 1 deletion build.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"github.com/BurntSushi/toml"
"github.com/Masterminds/semver/v3"
"github.com/paketo-buildpacks/packit/internal"
"github.com/paketo-buildpacks/packit/v2/internal"
)

// BuildFunc is the definition of a callback that can be invoked when the Build
Expand Down
6 changes: 3 additions & 3 deletions build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import (
"testing"
"testing/iotest"

"github.com/paketo-buildpacks/packit"
"github.com/paketo-buildpacks/packit/fakes"
"github.com/paketo-buildpacks/packit/v2"
"github.com/paketo-buildpacks/packit/v2/fakes"
"github.com/sclevine/spec"

. "github.com/onsi/gomega"
. "github.com/paketo-buildpacks/packit/matchers"
. "github.com/paketo-buildpacks/packit/v2/matchers"
)

func testBuild(t *testing.T, context spec.G, it spec.S) {
Expand Down
2 changes: 1 addition & 1 deletion cargo/buildpack_parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"testing"
"time"

"github.com/paketo-buildpacks/packit/cargo"
"github.com/paketo-buildpacks/packit/v2/cargo"
"github.com/sclevine/spec"

. "github.com/onsi/gomega"
Expand Down
4 changes: 2 additions & 2 deletions cargo/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
"testing"
"time"

"github.com/paketo-buildpacks/packit/cargo"
"github.com/paketo-buildpacks/packit/v2/cargo"
"github.com/sclevine/spec"

. "github.com/onsi/gomega"
. "github.com/paketo-buildpacks/packit/matchers"
. "github.com/paketo-buildpacks/packit/v2/matchers"
)

func testConfig(t *testing.T, context spec.G, it spec.S) {
Expand Down
2 changes: 1 addition & 1 deletion cargo/directory_duplicator.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package cargo

import "github.com/paketo-buildpacks/packit/fs"
import "github.com/paketo-buildpacks/packit/v2/fs"

type DirectoryDuplicator struct{}

Expand Down
2 changes: 1 addition & 1 deletion cargo/directory_duplicator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"path/filepath"
"testing"

"github.com/paketo-buildpacks/packit/cargo"
"github.com/paketo-buildpacks/packit/v2/cargo"
"github.com/sclevine/spec"

. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion cargo/transport_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"path/filepath"
"testing"

"github.com/paketo-buildpacks/packit/cargo"
"github.com/paketo-buildpacks/packit/v2/cargo"
"github.com/sclevine/spec"

. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion cargo/validated_reader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"
"testing"

"github.com/paketo-buildpacks/packit/cargo"
"github.com/paketo-buildpacks/packit/v2/cargo"
"github.com/sclevine/spec"

. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion chronos/clock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"testing"
"time"

"github.com/paketo-buildpacks/packit/chronos"
"github.com/paketo-buildpacks/packit/v2/chronos"
"github.com/sclevine/spec"

. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion chronos/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// import (
// "os"
//
// "github.com/paketo-buildpacks/packit/chronos"
// "github.com/paketo-buildpacks/packit/v2/chronos"
// )
//
// func main() {
Expand Down
2 changes: 1 addition & 1 deletion detect.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"

"github.com/BurntSushi/toml"
"github.com/paketo-buildpacks/packit/internal"
"github.com/paketo-buildpacks/packit/v2/internal"
)

// DetectFunc is the definition of a callback that can be invoked when the
Expand Down
8 changes: 4 additions & 4 deletions detect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import (
"path/filepath"
"testing"

"github.com/paketo-buildpacks/packit"
"github.com/paketo-buildpacks/packit/fakes"
"github.com/paketo-buildpacks/packit/internal"
"github.com/paketo-buildpacks/packit/v2"
"github.com/paketo-buildpacks/packit/v2/fakes"
"github.com/paketo-buildpacks/packit/v2/internal"
"github.com/sclevine/spec"

. "github.com/onsi/gomega"
. "github.com/paketo-buildpacks/packit/matchers"
. "github.com/paketo-buildpacks/packit/v2/matchers"
)

func testDetect(t *testing.T, context spec.G, it spec.S) {
Expand Down
6 changes: 3 additions & 3 deletions doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
// "os"
// "path/filepath"
//
// "github.com/paketo-buildpacks/packit"
// "github.com/paketo-buildpacks/packit/v2"
// )
//
// func main() {
Expand Down Expand Up @@ -96,7 +96,7 @@
//
// package main
//
// import "github.com/paketo-buildpacks/packit"
// import "github.com/paketo-buildpacks/packit/v2"
//
// func main() {
// // The build phase includes the yarn cli in a new layer that is made
Expand Down Expand Up @@ -162,7 +162,7 @@
//
// package main
//
// import "github.com/paketo-buildpacks/packit"
// import "github.com/paketo-buildpacks/packit/v2"
//
// func main() {
// detect := func(context packit.DetectContext) (packit.DetectResult, error) {
Expand Down
4 changes: 2 additions & 2 deletions draft/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"regexp"

"github.com/paketo-buildpacks/packit"
"github.com/paketo-buildpacks/packit/draft"
"github.com/paketo-buildpacks/packit/v2"
"github.com/paketo-buildpacks/packit/v2/draft"
)

func ExamplePlanner_Resolve() {
Expand Down
2 changes: 1 addition & 1 deletion draft/planner.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"regexp"
"sort"

"github.com/paketo-buildpacks/packit"
"github.com/paketo-buildpacks/packit/v2"
)

// A Planner sorts buildpack plan entries using a given list of priorities. A
Expand Down
4 changes: 2 additions & 2 deletions draft/planner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"regexp"
"testing"

"github.com/paketo-buildpacks/packit"
"github.com/paketo-buildpacks/packit/draft"
"github.com/paketo-buildpacks/packit/v2"
"github.com/paketo-buildpacks/packit/v2/draft"
"github.com/sclevine/spec"

. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion environment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package packit_test
import (
"testing"

"github.com/paketo-buildpacks/packit"
"github.com/paketo-buildpacks/packit/v2"
"github.com/sclevine/spec"

. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion fail.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package packit

import "github.com/paketo-buildpacks/packit/internal"
import "github.com/paketo-buildpacks/packit/v2/internal"

// Fail is a sentinal value that can be used to indicate a failure to detect
// during the detect phase. Fail implements the Error interface and should be
Expand Down
2 changes: 1 addition & 1 deletion fs/checksum_calculator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"path/filepath"
"testing"

"github.com/paketo-buildpacks/packit/fs"
"github.com/paketo-buildpacks/packit/v2/fs"
"github.com/sclevine/spec"

. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion fs/copy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"path/filepath"
"testing"

"github.com/paketo-buildpacks/packit/fs"
"github.com/paketo-buildpacks/packit/v2/fs"
"github.com/sclevine/spec"

. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion fs/exists_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"path/filepath"
"testing"

"github.com/paketo-buildpacks/packit/fs"
"github.com/paketo-buildpacks/packit/v2/fs"
"github.com/sclevine/spec"

. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion fs/is_empty_dir_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"path/filepath"
"testing"

"github.com/paketo-buildpacks/packit/fs"
"github.com/paketo-buildpacks/packit/v2/fs"
"github.com/sclevine/spec"

. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion fs/move_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"path/filepath"
"testing"

"github.com/paketo-buildpacks/packit/fs"
"github.com/paketo-buildpacks/packit/v2/fs"
"github.com/sclevine/spec"

. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/paketo-buildpacks/packit
module github.com/paketo-buildpacks/packit/v2

go 1.16

Expand Down
2 changes: 1 addition & 1 deletion internal/environment_writer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"path/filepath"
"testing"

"github.com/paketo-buildpacks/packit/internal"
"github.com/paketo-buildpacks/packit/v2/internal"
"github.com/sclevine/spec"

. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion internal/exit_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"errors"
"testing"

"github.com/paketo-buildpacks/packit/internal"
"github.com/paketo-buildpacks/packit/v2/internal"
"github.com/sclevine/spec"

. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion internal/fail_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package internal_test
import (
"testing"

"github.com/paketo-buildpacks/packit/internal"
"github.com/paketo-buildpacks/packit/v2/internal"
"github.com/sclevine/spec"

. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion internal/file_writer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"testing"
"testing/iotest"

"github.com/paketo-buildpacks/packit/internal"
"github.com/paketo-buildpacks/packit/v2/internal"
"github.com/sclevine/spec"

. "github.com/onsi/gomega"
Expand Down
4 changes: 2 additions & 2 deletions internal/toml_writer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import (
"path/filepath"
"testing"

"github.com/paketo-buildpacks/packit/internal"
"github.com/paketo-buildpacks/packit/v2/internal"
"github.com/sclevine/spec"

. "github.com/onsi/gomega"
. "github.com/paketo-buildpacks/packit/matchers"
. "github.com/paketo-buildpacks/packit/v2/matchers"
)

func testTOMLWriter(t *testing.T, context spec.G, it spec.S) {
Expand Down
2 changes: 1 addition & 1 deletion layer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"path/filepath"
"testing"

"github.com/paketo-buildpacks/packit"
"github.com/paketo-buildpacks/packit/v2"
"github.com/sclevine/spec"

. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion layers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"path/filepath"
"testing"

"github.com/paketo-buildpacks/packit"
"github.com/paketo-buildpacks/packit/v2"
"github.com/sclevine/spec"

. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion paketosbom/sbom_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
. "github.com/onsi/gomega"

//nolint Ignore SA1019, usage of deprecated package within a deprecated test case
"github.com/paketo-buildpacks/packit/paketosbom"
"github.com/paketo-buildpacks/packit/v2/paketosbom"
)

func testPaketoSBOM(t *testing.T, context spec.G, it spec.S) {
Expand Down
2 changes: 1 addition & 1 deletion pexec/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// import (
// "os"
//
// "github.com/paketo-buildpacks/packit/pexec"
// "github.com/paketo-buildpacks/packit/v2/pexec"
// )
//
// func main() {
Expand Down
7 changes: 3 additions & 4 deletions pexec/executable_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ import (
"path/filepath"
"testing"

"github.com/sclevine/spec"

"github.com/onsi/gomega/gexec"
"github.com/paketo-buildpacks/packit/pexec"
"github.com/paketo-buildpacks/packit/v2/pexec"
"github.com/sclevine/spec"

. "github.com/onsi/gomega"
)
Expand Down Expand Up @@ -127,7 +126,7 @@ func testPexec(t *testing.T, context spec.G, it spec.S) {
Expect(os.Setenv("PATH", existingPath)).To(Succeed())

var err error
errorCLI, err = gexec.Build("github.com/paketo-buildpacks/packit/fakes/some-executable", "-ldflags", "-X main.fail=true")
errorCLI, err = gexec.Build("github.com/paketo-buildpacks/packit/v2/fakes/some-executable", "-ldflags", "-X main.fail=true")
Expect(err).NotTo(HaveOccurred())

path = os.Getenv("PATH")
Expand Down
Loading

0 comments on commit c810215

Please sign in to comment.