Skip to content

Commit c491332

Browse files
authored
chore: disable ga (#1366)
* chore: disable ga * tidy
1 parent e197ab6 commit c491332

File tree

4 files changed

+8
-119
lines changed

4 files changed

+8
-119
lines changed

go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ go 1.16
55
require (
66
github.com/AlecAivazis/survey/v2 v2.1.1
77
github.com/Microsoft/hcsshim v0.8.17 // indirect
8-
github.com/Pallinder/go-randomdata v1.2.0
98
github.com/briandowns/spinner v1.11.1
109
github.com/cenkalti/backoff v2.2.1+incompatible
1110
github.com/charmbracelet/glow v1.4.0

go.sum

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8/go.mod h1:oX5x61
7979
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk=
8080
github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE=
8181
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
82-
github.com/Pallinder/go-randomdata v1.2.0 h1:DZ41wBchNRb/0GfsePLiSwb0PHZmT67XY00lCDlaYPg=
8382
github.com/Pallinder/go-randomdata v1.2.0/go.mod h1:yHmJgulpD2Nfrm0cR9tI/+oAgRqCQQixsA8HyRZfV9Y=
8483
github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
8584
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=

starport/cmd/starport/analytics.go

Lines changed: 0 additions & 87 deletions
This file was deleted.

starport/cmd/starport/main.go

Lines changed: 8 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,50 +8,28 @@ import (
88

99
starportcmd "github.com/tendermint/starport/starport/cmd"
1010
"github.com/tendermint/starport/starport/pkg/clictx"
11-
"github.com/tendermint/starport/starport/pkg/gacli"
1211
"github.com/tendermint/starport/starport/pkg/validation"
1312
)
1413

1514
func main() {
16-
defer func() {
17-
if r := recover(); r != nil {
18-
addMetric(Metric{
19-
Err: fmt.Errorf("%v", r),
20-
})
21-
fmt.Println(r)
22-
os.Exit(1)
23-
}
24-
}()
25-
gaclient = gacli.New(gaid)
26-
name, hadLogin := prepLoginName()
27-
if !hadLogin {
28-
addMetric(Metric{
29-
Login: name,
30-
IsInstallation: true,
31-
})
32-
}
33-
// if running serve command, don't wait sending metric until the end of
34-
// execution because it takes a long time.
35-
if len(os.Args) > 1 && os.Args[1] == "serve" {
36-
addMetric(Metric{})
37-
}
38-
3915
ctx := clictx.From(context.Background())
16+
4017
err := starportcmd.New().ExecuteContext(ctx)
4118

42-
if err == context.Canceled {
43-
addMetric(Metric{
44-
Err: err,
45-
})
19+
if ctx.Err() == context.Canceled || err == context.Canceled {
4620
fmt.Println("aborted")
4721
return
4822
}
23+
4924
if err != nil {
5025
var validationErr validation.Error
26+
5127
if errors.As(err, &validationErr) {
52-
panic(validationErr.ValidationInfo())
28+
fmt.Println(validationErr.ValidationInfo())
5329
} else {
54-
panic(err)
30+
fmt.Println(err)
5531
}
32+
33+
os.Exit(1)
5634
}
5735
}

0 commit comments

Comments
 (0)