зеркало из https://github.com/golang/tools.git
gopls: upload from telemetry.Start, rather than upload.Run
Change-Id: I6686ad224870fc3950c37a61cad6edd816e48a00 Reviewed-on: https://go-review.googlesource.com/c/tools/+/585416 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
This commit is contained in:
Родитель
e8808ed57e
Коммит
d40dfd59b8
|
@ -14,7 +14,6 @@ import (
|
|||
"os"
|
||||
"time"
|
||||
|
||||
"golang.org/x/telemetry/upload"
|
||||
"golang.org/x/tools/gopls/internal/cache"
|
||||
"golang.org/x/tools/gopls/internal/debug"
|
||||
"golang.org/x/tools/gopls/internal/lsprpc"
|
||||
|
@ -78,9 +77,6 @@ func (s *Serve) remoteArgs(network, address string) []string {
|
|||
// Run configures a server based on the flags, and then runs it.
|
||||
// It blocks until the server shuts down.
|
||||
func (s *Serve) Run(ctx context.Context, args ...string) error {
|
||||
// TODO(adonovan): eliminate this once telemetry.Start has this effect.
|
||||
go upload.Run(upload.RunConfig{}) // start telemetry uploader
|
||||
|
||||
if len(args) > 0 {
|
||||
return tool.CommandLineErrorf("server does not take arguments, got %v", args)
|
||||
}
|
||||
|
|
|
@ -26,7 +26,11 @@ var version = "" // if set by the linker, overrides the gopls version
|
|||
func main() {
|
||||
versionpkg.VersionOverride = version
|
||||
|
||||
telemetry.Start(telemetry.Config{ReportCrashes: true})
|
||||
telemetry.Start(telemetry.Config{
|
||||
ReportCrashes: true,
|
||||
Upload: true,
|
||||
})
|
||||
|
||||
ctx := context.Background()
|
||||
tool.Main(ctx, cmd.New(), os.Args[1:])
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче