Skip to content

Commit 487189d

Browse files
committed
cmd: fix some golint warnings
These: internal/container/mesos/handler.go:173:25: error strings should not be capitalized or end with punctuation or a newline (golint) return "", fmt.Errorf("could not find path for resource %q for container %q\n", resource, h.name) ^ internal/storage/bigquery/client/client.go:147:9: `if` block ends with a `return` statement, so drop this `else` and outdent its block (golint) } else { ^ Signed-off-by: Kir Kolyshkin <[email protected]>
1 parent 439dd12 commit 487189d

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

cmd/internal/container/mesos/handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ func (h *mesosContainerHandler) GetStats() (*info.ContainerStats, error) {
170170
func (h *mesosContainerHandler) GetCgroupPath(resource string) (string, error) {
171171
path, ok := h.cgroupPaths[resource]
172172
if !ok {
173-
return "", fmt.Errorf("could not find path for resource %q for container %q\n", resource, h.name)
173+
return "", fmt.Errorf("could not find path for resource %q for container %q", resource, h.name)
174174
}
175175
return path, nil
176176
}

cmd/internal/storage/bigquery/client/client.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,8 @@ func (c *Client) PrintDatasets() error {
144144
if err != nil {
145145
fmt.Printf("Failed to get list of datasets\n")
146146
return err
147-
} else {
148-
fmt.Printf("Successfully retrieved datasets. Retrieved: %d\n", len(datasetList.Datasets))
149147
}
148+
fmt.Printf("Successfully retrieved datasets. Retrieved: %d\n", len(datasetList.Datasets))
150149

151150
for _, d := range datasetList.Datasets {
152151
fmt.Printf("%s %s\n", d.Id, d.FriendlyName)

0 commit comments

Comments
 (0)