From 09cea487c23b343b768f3644a4a68b6cc818e46b Mon Sep 17 00:00:00 2001 From: Brad Findell Date: Mon, 24 Aug 2020 00:11:05 -0400 Subject: [PATCH] Fix not compiling on Mac OS Implement suggested edits in May 17 post at https://github.com/XimeraProject/homebrew-xake/issues/3 --- data.go | 4 +++- main.go | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/data.go b/data.go index 34b66d1..d6dab86 100644 --- a/data.go +++ b/data.go @@ -14,6 +14,7 @@ import ( "github.com/funny/binary" // "regexp" "github.com/golang/snappy" + "github.com/reiver/go-cast" "os" "strings" "time" @@ -73,7 +74,8 @@ func DownloadData() error { defer t.Stop() var bar *pb.ProgressBar - bar = pb.StartNew(int(resp.Size)) + respSize, err := cast.Int64(resp.Size) + bar = pb.StartNew(int(respSize)) bar.ShowTimeLeft = true bar.SetUnits(pb.U_BYTES) bar.Start() diff --git a/main.go b/main.go index b6619a1..fb9e94b 100644 --- a/main.go +++ b/main.go @@ -6,7 +6,7 @@ import ( prefixed "github.com/kisonecat/logrus-prefixed-formatter" "github.com/sirupsen/logrus" //"github.com/tcnksm/go-latest" - "github.com/urfave/cli" + "gopkg.in/urfave/cli.v1" "net/url" "os" "sort" @@ -33,7 +33,7 @@ func main() { app.Name = "xake" app.Usage = "a build tool (make) for Ximera" - app.Version = "0.9.4" + app.Version = "0.9.4.1" // Check to see if this is the newest version Humorously, // go-latest depends on go>=1.7 because that was when "context"