提交 e4aaebc9 编写于 作者: O openeuler-ci-bot 提交者: Gitee

!45 bugfix: fix review suggestions

Merge pull request !45 from DCCooper/review
......@@ -80,15 +80,15 @@ func runLoad(ctx context.Context, cli Cli) error {
for {
msg, rerr := resp.Recv()
if msg != nil {
fmt.Print(msg.Log)
}
if rerr != nil {
if rerr != io.EOF {
err = rerr
return rerr
}
break
}
if msg != nil {
fmt.Print(msg.Log)
}
}
return err
......
......@@ -59,9 +59,6 @@ func runTag(ctx context.Context, cli Cli, args []string) error {
Image: args[0],
Tag: args[1],
})
if err != nil {
return err
}
return nil
return err
}
......@@ -51,7 +51,7 @@ func (b *Backend) Load(req *pb.LoadRequest, stream pb.Control_LoadServer) error
topLevelImageManifest, err := tarfileSource.LoadTarManifest()
if err != nil || len(topLevelImageManifest) == 0 {
return errors.Wrapf(err, "failed to get the top level image manifest")
return errors.Errorf("failed to get the top level image manifest: %v", err)
}
log := logger.NewCliLogger(constant.CliLogBufferLen)
......@@ -90,7 +90,7 @@ func (b *Backend) Load(req *pb.LoadRequest, stream pb.Control_LoadServer) error
if werr := eg.Wait(); werr != nil {
return werr
}
logrus.Infof("Loaded image as %s", si.ID)
return nil
}
......@@ -29,7 +29,7 @@ import (
const (
maxServerNameLength = 255
maxLoadFileSize = 10 * 1024 * 1024 * 1024
maxLoadFileSize = 50 * 1024 * 1024 * 1024
decimalPrefixBase = 1000
)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册