From b229c7472310c4d1165bab4e3256abc81f432100 Mon Sep 17 00:00:00 2001 From: zongz Date: Fri, 26 Apr 2024 14:45:53 +0800 Subject: [PATCH] fix: make depDownloader in KpmClient public Signed-off-by: zongz --- pkg/client/client.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/client/client.go b/pkg/client/client.go index 8a7e5fbb8..43c9f3b8f 100644 --- a/pkg/client/client.go +++ b/pkg/client/client.go @@ -36,7 +36,7 @@ type KpmClient struct { // The writer of the log. logWriter io.Writer // The downloader of the dependencies. - depDownloader *downloader.DepDownloader + DepDownloader *downloader.DepDownloader // The home path of kpm for global configuration file and kcl package storage path. homePath string // The settings of kpm loaded from the global configuration file. @@ -62,7 +62,7 @@ func NewKpmClient() (*KpmClient, error) { logWriter: os.Stdout, settings: *settings, homePath: homePath, - depDownloader: &downloader.DepDownloader{}, + DepDownloader: &downloader.DepDownloader{}, }, nil } @@ -849,7 +849,7 @@ func (c *KpmClient) Download(dep *pkg.Dependency, homePath, localPath string) (* } if dep.Source.Oci != nil { - err := c.depDownloader.Download(*downloader.NewDownloadOptions( + err := c.DepDownloader.Download(*downloader.NewDownloadOptions( downloader.WithLocalPath(localPath), downloader.WithSource(dep.Source), downloader.WithLogWriter(c.logWriter),