From c96ecaae4a9ef27677229657afc322a843b33c02 Mon Sep 17 00:00:00 2001 From: knqyf263 Date: Sun, 10 Nov 2019 16:48:50 +0200 Subject: [PATCH] fix(github): use GetName --- pkg/github/github.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/github/github.go b/pkg/github/github.go index 39559cfc63..55c60b8676 100644 --- a/pkg/github/github.go +++ b/pkg/github/github.go @@ -78,7 +78,7 @@ func (c Client) DownloadDB(ctx context.Context, fileName string) (io.ReadCloser, prefix := fmt.Sprintf("v%d", db.SchemaVersion) for _, release := range releases { log.Logger.Debugf("release name: %s", release.GetName()) - if !strings.HasPrefix(*release.Name, prefix) { + if !strings.HasPrefix(release.GetName(), prefix) { continue } @@ -96,8 +96,8 @@ func (c Client) DownloadDB(ctx context.Context, fileName string) (io.ReadCloser, } func (c Client) downloadAsset(ctx context.Context, asset github.ReleaseAsset, fileName string) (io.ReadCloser, error) { - log.Logger.Debugf("asset name: %s", *asset.Name) - if *asset.Name != fileName { + log.Logger.Debugf("asset name: %s", asset.GetName()) + if asset.GetName() != fileName { return nil, xerrors.New("file name doesn't match") }