internal/lsp,internal/telemetry: correct stale docstrings

Several docstrings reference earlier names for the symbols they
document. This CL corrects those that I noticed while reading the lsp
code.

Change-Id: I1968459feff7011e070333c99eb149e72d3302de
Reviewed-on: https://go-review.googlesource.com/c/tools/+/214801
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
This commit is contained in:
Rob Findley 2020-01-14 18:48:43 -05:00 committed by Robert Findley
parent 831fdb1e18
commit df87866820
5 changed files with 8 additions and 8 deletions

View File

@ -44,8 +44,8 @@ func RunServerOnPort(ctx context.Context, cache source.Cache, port int, h func(c
return RunServerOnAddress(ctx, cache, fmt.Sprintf(":%v", port), h)
}
// RunServerOnPort starts an LSP server on the given port and does not exit.
// This function exists for debugging purposes.
// RunServerOnAddress starts an LSP server on the given address and does not
// exit. This function exists for debugging purposes.
func RunServerOnAddress(ctx context.Context, cache source.Cache, addr string, h func(ctx context.Context, s *Server)) error {
ln, err := net.Listen("tcp", addr)
if err != nil {

View File

@ -215,7 +215,7 @@ const (
SynopsisDocumentation
FullDocumentation
// structured is an experimental setting that returns a structured hover format.
// Structured is an experimental setting that returns a structured hover format.
// This format separates the signature from the documentation, so that the client
// can do more manipulation of these fields.
//

View File

@ -24,7 +24,7 @@ type Int64Measure struct {
subscribers []Int64Subscriber
}
// Int64Measure is used to record floating point values.
// Float64Measure is used to record floating point values.
type Float64Measure struct {
name string
description string

View File

@ -26,7 +26,7 @@ func (t Tag) Format(f fmt.State, r rune) {
fmt.Fprintf(f, `%v="%v"`, t.Key, t.Value)
}
// Get returns the tag unmodified.
// Tag returns the tag unmodified.
// It makes Key conform to the Tagger interface.
func (t Tag) Tag(ctx context.Context) Tag {
return t

View File

@ -10,10 +10,10 @@ package unit
type Unit string
const (
// UnitDimensionless indicates that a measure has no specified units.
// Dimensionless indicates that a measure has no specified units.
Dimensionless = "1"
// UnitBytes indicates that that a measure is recording number of bytes.
// Bytes indicates that that a measure is recording number of bytes.
Bytes = "By"
// UnitMilliseconds indicates that a measure is recording a duration in milliseconds.
// Milliseconds indicates that a measure is recording a duration in milliseconds.
Milliseconds = "ms"
)