1 // Copyright 2020 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
8 exec "golang.org/x/sys/execabs"
10 errors "golang.org/x/xerrors"
14 startRemote = startRemoteDefault
15 autoNetworkAddress = autoNetworkAddressDefault
16 verifyRemoteOwnership = verifyRemoteOwnershipDefault
19 func startRemoteDefault(goplsPath string, args ...string) error {
20 cmd := exec.Command(goplsPath, args...)
21 if err := cmd.Start(); err != nil {
22 return errors.Errorf("starting remote gopls: %w", err)
27 // autoNetworkAddress returns the default network and address for the
28 // automatically-started gopls remote. See autostart_posix.go for more
30 func autoNetworkAddressDefault(goplsPath, id string) (network string, address string) {
32 panic("identified remotes are not supported on windows")
34 return "tcp", "localhost:37374"
37 func verifyRemoteOwnershipDefault(network, address string) (bool, error) {