Skip to content

Commit

Permalink
Undoing trivial formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ycombinator committed Mar 9, 2023
1 parent bbb5290 commit 895d73f
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 15 deletions.
1 change: 1 addition & 0 deletions dev-tools/mage/gotest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ var gotestHelperMode = os.Getenv(envGoTestHelper) == "1"
//
// // sample test
// }
//
func TestGoTest_CaptureOutput(t *testing.T) {
errNonZero := "go test returned a non-zero value"
makeArgs := func(test string) GoTestArgs {
Expand Down
3 changes: 1 addition & 2 deletions internal/pkg/agent/errors/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.

// Package errors provides a small api to manage hierarchy of errors.
//
//nolint:errorlint,errcheck // Postpone the change here until we refactor error handling.
// Package errors provides a small api to manage hierarchy of errors.
package errors

import (
Expand Down
3 changes: 1 addition & 2 deletions internal/pkg/composable/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ func (r *providerRegistry) MustAddContextProvider(name string, builder ContextPr
}
}

// AddContextProvider adds a new ContextProviderBuilder
//
//nolint:dupl,goimports,nolintlint // false positive
// AddContextProvider adds a new ContextProviderBuilder
func (r *providerRegistry) AddContextProvider(name string, builder ContextProviderBuilder) error {
r.lock.Lock()
defer r.lock.Unlock()
Expand Down
3 changes: 1 addition & 2 deletions internal/pkg/composable/dynamic.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,8 @@ func (r *providerRegistry) MustAddDynamicProvider(name string, builder DynamicPr
}
}

// AddDynamicProvider adds a new DynamicProviderBuilder
//
//nolint:dupl,goimports,nolintlint // false positive
// AddDynamicProvider adds a new DynamicProviderBuilder
func (r *providerRegistry) AddDynamicProvider(providerName string, builder DynamicProviderBuilder) error {
r.lock.Lock()
defer r.lock.Unlock()
Expand Down
6 changes: 2 additions & 4 deletions internal/pkg/composable/testing/dynamic.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,8 @@ func (t *DynamicComm) Previous(id string) (DynamicState, bool) {
return prev, ok
}

// PreviousIDs returns the previous set mapping ID.
//
//nolint:prealloc,goimports,nolintlint // false positive
// PreviousIDs returns the previous set mapping ID.
func (t *DynamicComm) PreviousIDs() []string {
t.lock.Lock()
defer t.lock.Unlock()
Expand All @@ -102,9 +101,8 @@ func (t *DynamicComm) Current(id string) (DynamicState, bool) {
return curr, ok
}

// CurrentIDs returns the current set mapping ID.
//
//nolint:prealloc,goimports,nolintlint // false positive
// CurrentIDs returns the current set mapping ID.
func (t *DynamicComm) CurrentIDs() []string {
t.lock.Lock()
defer t.lock.Unlock()
Expand Down
2 changes: 0 additions & 2 deletions internal/pkg/fleetapi/ack_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ type AckEvent struct {
// AckRequest consists of multiple actions acked to fleet ui.
// POST /agents/{agentId}/acks
// Authorization: ApiKey {AgentAccessApiKey}
//
// {
// "action_ids": ["id1"]
// }
Expand All @@ -62,7 +61,6 @@ type AckResponseItem struct {

// AckResponse is the response send back from the server.
// 200
//
// {
// "action": "acks"
// "items": [
Expand Down
2 changes: 0 additions & 2 deletions internal/pkg/fleetapi/enroll_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ func (p EnrollType) MarshalJSON() ([]byte, error) {
//
// Example:
// POST /api/fleet/agents/enroll
//
// {
// "type": "PERMANENT",
// "metadata": {
Expand Down Expand Up @@ -117,7 +116,6 @@ func (e *EnrollRequest) Validate() error {
// EnrollResponse is the data received after enrolling an Agent into fleet.
//
// Example:
//
// {
// "action": "created",
// "item": {
Expand Down
1 change: 0 additions & 1 deletion internal/pkg/remote/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ func newClient(
// - never used
// - without errors, last used first when more than one does not have errors
// - last errored.
//
// It also removes the last error after retryOnBadConnTimeout has elapsed.
func (c *Client) sortClients() {
now := time.Now().UTC()
Expand Down

0 comments on commit 895d73f

Please sign in to comment.