[pkgsite-metrics] internal/{analysis/bigquery}: improve docstrings

1 view
Skip to first unread message

Zvonimir Pavlinovic (Gerrit)

unread,
Mar 28, 2023, 3:49:44 PM3/28/23
to goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Jonathan Amsterdam, Gopher Robot, Maceo Thompson, golang-co...@googlegroups.com

Zvonimir Pavlinovic submitted this change.

View Change

Approvals: Jonathan Amsterdam: Looks good to me, approved Gopher Robot: TryBots succeeded Zvonimir Pavlinovic: Run TryBots
internal/{analysis/bigquery}: improve docstrings

Change-Id: I6ed3ea719a0d74ceb8d8a2fd1f187adf81b6e95a
Reviewed-on: https://go-review.googlesource.com/c/pkgsite-metrics/+/479755
TryBot-Result: Gopher Robot <go...@golang.org>
Run-TryBot: Zvonimir Pavlinovic <zpavl...@google.com>
Reviewed-by: Jonathan Amsterdam <j...@google.com>
---
M internal/analysis/analysis.go
M internal/bigquery/bigquery.go
2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/internal/analysis/analysis.go b/internal/analysis/analysis.go
index 9a86823..b72aae7 100644
--- a/internal/analysis/analysis.go
+++ b/internal/analysis/analysis.go
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

+// Package analysis provides functionality for manipulating
+// inputs and outputs of analysis endpoints.
package analysis

import (
@@ -75,8 +77,8 @@
// Each result is either a jsonError or a list of JSONDiagnostic.
type JSONTree map[string]map[string]DiagnosticsOrError

-// A JSONDiagnostic can be used to encode and decode analysis.Diagnostics to and
-// from JSON.
+// A JSONDiagnostic can be used to encode and decode
+// analysis.Diagnostics to and from JSON.
type JSONDiagnostic struct {
Category string `json:"category,omitempty"`
Posn string `json:"posn"`
@@ -92,7 +94,7 @@
Edits []JSONTextEdit `json:"edits"`
}

-// A TextEdit describes the replacement of a portion of a file.
+// A JSONTextEdit describes the replacement of a portion of a file.
// Start and End are zero-based half-open indices into the original byte
// sequence of the file, and New is the new text.
type JSONTextEdit struct {
diff --git a/internal/bigquery/bigquery.go b/internal/bigquery/bigquery.go
index b738242..77c6b26 100644
--- a/internal/bigquery/bigquery.go
+++ b/internal/bigquery/bigquery.go
@@ -356,6 +356,6 @@
return fmt.Sprintf(qf, cols, q.PartitionOn, q.OrderBy, "`"+q.Table+"`")
}

-// Copy InferSchema so users don't have to import cloud.google.com/go/bigquery
-// just to get it.
+// InferSchema is a copy of cloud.google.com/go/bigquery.InferSchema so
+// users don't have to import cloud.google.com/go/bigquery just to get it.
var InferSchema = bq.InferSchema

To view, visit change 479755. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pkgsite-metrics
Gerrit-Branch: master
Gerrit-Change-Id: I6ed3ea719a0d74ceb8d8a2fd1f187adf81b6e95a
Gerrit-Change-Number: 479755
Gerrit-PatchSet: 3
Gerrit-Owner: Zvonimir Pavlinovic <zpavl...@google.com>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Jonathan Amsterdam <j...@google.com>
Gerrit-Reviewer: Maceo Thompson <maceot...@google.com>
Gerrit-Reviewer: Zvonimir Pavlinovic <zpavl...@google.com>
Gerrit-MessageType: merged
Reply all
Reply to author
Forward
0 new messages