Skip to content

Commit

Permalink
Merge pull request #7 from bloodorangeio/vanity-imports
Browse files Browse the repository at this point in the history
Use oras.land vanity import
  • Loading branch information
jdolitsky authored Jun 11, 2021
2 parents 356245d + 9f29240 commit bb21eb6
Show file tree
Hide file tree
Showing 18 changed files with 34 additions and 29 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

Using the ORAS Go library, you can develop your own push/pull experience: `myclient push artifacts.azurecr.io/myartifact:1.0 ./mything.thang`

The package `github.com/oras-project/oras-go/pkg/oras` can quickly be imported in other Go-based tools that
The package `oras.land/oras-go` can quickly be imported in other Go-based tools that
wish to benefit from the ability to store arbitrary content in container registries.

### ORAS Go Library Example
Expand All @@ -26,11 +26,11 @@ import (
"context"
"fmt"

"github.com/oras-project/oras-go/pkg/content"
"github.com/oras-project/oras-go/pkg/oras"

"github.com/containerd/containerd/remotes/docker"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"

"oras.land/oras-go/pkg/content"
"oras.land/oras-go/pkg/oras"
)

func check(e error) {
Expand Down
6 changes: 3 additions & 3 deletions examples/simple_push_pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ import (
"fmt"
"os"

"github.com/oras-project/oras-go/pkg/content"
"github.com/oras-project/oras-go/pkg/oras"

"github.com/containerd/containerd/remotes/docker"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"

"oras.land/oras-go/pkg/content"
"oras.land/oras-go/pkg/oras"
)

func check(e error) {
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/oras-project/oras-go
module oras.land/oras-go

go 1.16

Expand Down
4 changes: 2 additions & 2 deletions pkg/auth/docker/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ package docker
import (
"os"

"github.com/oras-project/oras-go/pkg/auth"

"github.com/docker/cli/cli/config"
"github.com/docker/cli/cli/config/configfile"
"github.com/docker/cli/cli/config/credentials"
"github.com/pkg/errors"

"oras.land/oras-go/pkg/auth"
)

// Client provides authentication operations for docker registries.
Expand Down
2 changes: 1 addition & 1 deletion pkg/auth/docker/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (
"github.com/stretchr/testify/suite"
"golang.org/x/crypto/bcrypt"

iface "github.com/oras-project/oras-go/pkg/auth"
iface "oras.land/oras-go/pkg/auth"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion pkg/auth/docker/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"github.com/docker/docker/api/types"
"github.com/docker/docker/registry"

iface "github.com/oras-project/oras-go/pkg/auth"
iface "oras.land/oras-go/pkg/auth"
)

// Login logs in to a docker registry identified by the hostname.
Expand Down
4 changes: 2 additions & 2 deletions pkg/auth/docker/logout.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ package docker
import (
"context"

"github.com/oras-project/oras-go/pkg/auth"

"github.com/docker/cli/cli/config/configfile"

"oras.land/oras-go/pkg/auth"
)

// Logout logs out from a docker registry identified by the hostname.
Expand Down
2 changes: 1 addition & 1 deletion pkg/auth/docker/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
ctypes "github.com/docker/cli/cli/config/types"
"github.com/docker/docker/registry"

iface "github.com/oras-project/oras-go/pkg/auth"
iface "oras.land/oras-go/pkg/auth"
)

// Resolver returns a new authenticated resolver.
Expand Down
3 changes: 2 additions & 1 deletion pkg/content/decompressstore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ import (
"testing"

ctrcontent "github.com/containerd/containerd/content"
"github.com/oras-project/oras-go/pkg/content"
digest "github.com/opencontainers/go-digest"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"

"oras.land/oras-go/pkg/content"
)

func TestDecompressStore(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion pkg/content/file_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ import (
"testing"

ctrcontent "github.com/containerd/containerd/content"
"github.com/oras-project/oras-go/pkg/content"
digest "github.com/opencontainers/go-digest"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"

"oras.land/oras-go/pkg/content"
)

func TestFileStoreNoName(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion pkg/content/multireader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ import (
"testing"

ctrcontent "github.com/containerd/containerd/content"
"github.com/oras-project/oras-go/pkg/content"
digest "github.com/opencontainers/go-digest"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"

"oras.land/oras-go/pkg/content"
)

var (
Expand Down
3 changes: 2 additions & 1 deletion pkg/content/passthrough_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ import (
"testing"

ctrcontent "github.com/containerd/containerd/content"
"github.com/oras-project/oras-go/pkg/content"
digest "github.com/opencontainers/go-digest"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"

"oras.land/oras-go/pkg/content"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion pkg/oras/oras_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
"testing"
"time"

orascontent "github.com/oras-project/oras-go/pkg/content"
orascontent "oras.land/oras-go/pkg/content"

"github.com/containerd/containerd/images"
"github.com/containerd/containerd/remotes"
Expand Down
4 changes: 2 additions & 2 deletions pkg/oras/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ import (
"context"
"sync"

orascontent "github.com/oras-project/oras-go/pkg/content"

"github.com/containerd/containerd/content"
"github.com/containerd/containerd/images"
"github.com/containerd/containerd/log"
"github.com/containerd/containerd/remotes"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/pkg/errors"
"golang.org/x/sync/semaphore"

orascontent "oras.land/oras-go/pkg/content"
)

// Pull pull files from the remote
Expand Down
4 changes: 2 additions & 2 deletions pkg/oras/pull_opts.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ import (
"io"
"sync"

orascontent "github.com/oras-project/oras-go/pkg/content"

"github.com/containerd/containerd/images"
"github.com/opencontainers/go-digest"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
"golang.org/x/sync/semaphore"

orascontent "oras.land/oras-go/pkg/content"
)

type pullOpts struct {
Expand Down
3 changes: 2 additions & 1 deletion pkg/oras/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ import (
"github.com/containerd/containerd/content"
"github.com/containerd/containerd/images"
"github.com/containerd/containerd/remotes"
artifact "github.com/oras-project/oras-go/pkg/artifact"
digest "github.com/opencontainers/go-digest"
specs "github.com/opencontainers/image-spec/specs-go"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"

artifact "oras.land/oras-go/pkg/artifact"
)

// Push pushes files to the remote
Expand Down
4 changes: 2 additions & 2 deletions pkg/oras/push_opts.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ import (
"sync"

"github.com/containerd/containerd/images"
orascontent "github.com/oras-project/oras-go/pkg/content"

ocispec "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/pkg/errors"

orascontent "oras.land/oras-go/pkg/content"
)

type pushOpts struct {
Expand Down
4 changes: 2 additions & 2 deletions pkg/oras/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ import (
"io"
"time"

orascontent "github.com/oras-project/oras-go/pkg/content"

"github.com/containerd/containerd/content"
"github.com/opencontainers/go-digest"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
"golang.org/x/sync/errgroup"

orascontent "oras.land/oras-go/pkg/content"
)

// ensure interface
Expand Down

0 comments on commit bb21eb6

Please sign in to comment.