working commit
This commit is contained in:
@@ -13,7 +13,6 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"mstore/pkg/auxtool"
|
||||
"mstore/pkg/auxutar"
|
||||
@@ -26,15 +25,13 @@ import (
|
||||
"github.com/google/go-containerregistry/pkg/v1/remote/transport"
|
||||
)
|
||||
|
||||
func (cli *Client) PushImage(ctx context.Context, filepath, imagepath string, timeout time.Duration) error {
|
||||
func (cli *Client) PushImage(ctx context.Context, filepath, imagepath string) error {
|
||||
var err error
|
||||
ctx, _ = context.WithTimeout(ctx, timeout)
|
||||
|
||||
imagepath, username, password, err := repackReference(imagepath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
options := make([]crane.Option, 0)
|
||||
options = append(options, crane.WithContext(ctx))
|
||||
if username != "" && password != "" {
|
||||
|
||||
Reference in New Issue
Block a user