mirror of
https://github.com/golang/go.git
synced 2025-05-05 15:43:04 +00:00
This changes adds basic support for running `go mod tidy` as a code action when a user opens a go.mod file. When we have a command available like `go mod tidy -check`, we will be able to return edits as part of the codeAction. For now, we execute the command directly. This change also required a few modifications to our handling of file kinds so that we could distinguish between a Go file and a go.mod file. Change-Id: I343079b8886724b67f90a314e45639545a34f21e Reviewed-on: https://go-review.googlesource.com/c/tools/+/196322 Run-TryBot: Rebecca Stambler <rstambler@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Cottrell <iancottrell@google.com>
15 lines
439 B
Go
15 lines
439 B
Go
// Copyright 2019 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package cache
|
|
|
|
// sumFile holds all of the information we know about a sum file.
|
|
type sumFile struct {
|
|
fileBase
|
|
}
|
|
|
|
func (*sumFile) setContent(content []byte) {}
|
|
func (*sumFile) filename() string { return "" }
|
|
func (*sumFile) isActive() bool { return false }
|