Skip to content

Commit

Permalink
Fixbug: '1.2.2'版本无法正常安装。voidint#9
Browse files Browse the repository at this point in the history
  • Loading branch information
voidint committed May 5, 2019
1 parent ff8450a commit fc08231
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ var ErrPackageNotFound = errors.New("installation package not found")

// FindPackage 返回指定操作系统和硬件架构的版本包
func (v *Version) FindPackage(kind, goos, goarch string) (*Package, error) {
prefix := fmt.Sprintf("go%s.%s-%s.", v.Name, goos, goarch)
prefix := fmt.Sprintf("go%s.%s-%s", v.Name, goos, goarch)
for i := range v.Packages {
if v.Packages[i] == nil || !strings.EqualFold(v.Packages[i].Kind, kind) || !strings.HasPrefix(v.Packages[i].FileName, prefix) {
continue
Expand Down

0 comments on commit fc08231

Please sign in to comment.