From df878668205728a7ce9d19a6dffcb2ea662ee4b8 Mon Sep 17 00:00:00 2001 From: Rob Findley Date: Tue, 14 Jan 2020 18:48:43 -0500 Subject: [PATCH] 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 --- internal/lsp/server.go | 4 ++-- internal/lsp/source/options.go | 2 +- internal/telemetry/stats/stats.go | 2 +- internal/telemetry/tag.go | 2 +- internal/telemetry/unit/unit.go | 6 +++--- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/internal/lsp/server.go b/internal/lsp/server.go index 7c94c45a72..0d2532837c 100644 --- a/internal/lsp/server.go +++ b/internal/lsp/server.go @@ -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 { diff --git a/internal/lsp/source/options.go b/internal/lsp/source/options.go index a2eeb0baea..15849812c7 100644 --- a/internal/lsp/source/options.go +++ b/internal/lsp/source/options.go @@ -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. // diff --git a/internal/telemetry/stats/stats.go b/internal/telemetry/stats/stats.go index f3d3ede99c..65758031d3 100644 --- a/internal/telemetry/stats/stats.go +++ b/internal/telemetry/stats/stats.go @@ -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 diff --git a/internal/telemetry/tag.go b/internal/telemetry/tag.go index 6d7e11daf0..54c6102f48 100644 --- a/internal/telemetry/tag.go +++ b/internal/telemetry/tag.go @@ -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 diff --git a/internal/telemetry/unit/unit.go b/internal/telemetry/unit/unit.go index a904a280e5..596a5c779e 100644 --- a/internal/telemetry/unit/unit.go +++ b/internal/telemetry/unit/unit.go @@ -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" )