X-Git-Url: https://git.josue.xyz/?a=blobdiff_plain;f=.config%2Fcoc%2Fextensions%2Fcoc-go-data%2Ftools%2Fpkg%2Fmod%2Fgolang.org%2Fx%2Ftools%40v0.0.0-20201105173854-bc9fc8d8c4bc%2Finternal%2Flsp%2Fdebug%2Finfo.1.12.go;fp=.config%2Fcoc%2Fextensions%2Fcoc-go-data%2Ftools%2Fpkg%2Fmod%2Fgolang.org%2Fx%2Ftools%40v0.0.0-20201105173854-bc9fc8d8c4bc%2Finternal%2Flsp%2Fdebug%2Finfo.1.12.go;h=e8bae36b4181b0eb4de881eb79cfcf0dcf0d969d;hb=4d07c77cf4d78cab8639e13ddc3c22495e585b0b;hp=0000000000000000000000000000000000000000;hpb=b3950616b54221c40a7dab9099bda675007e5b6e;p=dotfiles%2F.git diff --git a/.config/coc/extensions/coc-go-data/tools/pkg/mod/golang.org/x/tools@v0.0.0-20201105173854-bc9fc8d8c4bc/internal/lsp/debug/info.1.12.go b/.config/coc/extensions/coc-go-data/tools/pkg/mod/golang.org/x/tools@v0.0.0-20201105173854-bc9fc8d8c4bc/internal/lsp/debug/info.1.12.go new file mode 100644 index 00000000..e8bae36b --- /dev/null +++ b/.config/coc/extensions/coc-go-data/tools/pkg/mod/golang.org/x/tools@v0.0.0-20201105173854-bc9fc8d8c4bc/internal/lsp/debug/info.1.12.go @@ -0,0 +1,38 @@ +// 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. + +// +build go1.12 + +package debug + +import ( + "fmt" + "io" + "runtime/debug" +) + +func printBuildInfo(w io.Writer, verbose bool, mode PrintMode) { + if info, ok := debug.ReadBuildInfo(); ok { + fmt.Fprintf(w, "%v %v\n", info.Path, Version) + printModuleInfo(w, &info.Main, mode) + if verbose { + for _, dep := range info.Deps { + printModuleInfo(w, dep, mode) + } + } + } else { + fmt.Fprintf(w, "version %s, built in $GOPATH mode\n", Version) + } +} + +func printModuleInfo(w io.Writer, m *debug.Module, mode PrintMode) { + fmt.Fprintf(w, " %s@%s", m.Path, m.Version) + if m.Sum != "" { + fmt.Fprintf(w, " %s", m.Sum) + } + if m.Replace != nil { + fmt.Fprintf(w, " => %v", m.Replace.Path) + } + fmt.Fprintf(w, "\n") +}