Skip to content

Commit

Permalink
Use gofmt to add new build constraint syntax (#4558)
Browse files Browse the repository at this point in the history
* Use gofmt to add new build constraint syntax

Signed-off-by: c-kruse <[email protected]>

* update changelog entry

Signed-off-by: c-kruse <[email protected]>
  • Loading branch information
c-kruse authored Dec 15, 2021
1 parent 66f1728 commit d9316a9
Show file tree
Hide file tree
Showing 68 changed files with 85 additions and 18 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Versioning](http://semver.org/spec/v2.0.0.html).

### Changed
- Removed unused rate limiting code in the liveness package.
- Include new Go 1.17+ build constraint syntax by running gofmt

## [6.6.1, 6.6.2] - 2021-11-29

Expand Down
1 change: 1 addition & 0 deletions agent/agent_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build integration
// +build integration

package agent
Expand Down
1 change: 1 addition & 0 deletions agent/check_handler_env_unix_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !windows
// +build !windows

package agent
Expand Down
1 change: 1 addition & 0 deletions agent/check_handler_env_windows_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build windows
// +build windows

package agent
Expand Down
1 change: 1 addition & 0 deletions agent/cmd/install_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build windows
// +build windows

package cmd
Expand Down
1 change: 1 addition & 0 deletions agent/cmd/logger_unix.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !windows
// +build !windows

package cmd
Expand Down
1 change: 1 addition & 0 deletions agent/cmd/windows.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build windows
// +build windows

package cmd
Expand Down
1 change: 1 addition & 0 deletions agent/debug_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !debug
// +build !debug

package agent
Expand Down
34 changes: 17 additions & 17 deletions agent/sockets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ func TestHandleTCPMessages(t *testing.T) {
}

payload := corev1.CheckResult{
Name: "app_01",
Output: "could not connect to something",
Source: "proxyEnt",
Name: "app_01",
Output: "could not connect to something",
Source: "proxyEnt",
Command: "command",
}
bytes, _ := json.Marshal(payload)
Expand Down Expand Up @@ -92,9 +92,9 @@ func TestHandleTCPMessagesWithClient(t *testing.T) {
}

payload := corev1.CheckResult{
Name: "app_01",
Output: "could not connect to something",
Client: "proxyEnt",
Name: "app_01",
Output: "could not connect to something",
Client: "proxyEnt",
Command: "command",
}
bytes, _ := json.Marshal(payload)
Expand Down Expand Up @@ -145,9 +145,9 @@ func TestHandleTCPMessagesWithAgent(t *testing.T) {
}

payload := corev1.CheckResult{
Name: "app_01",
Output: "could not connect to something",
Source: cfg.AgentName,
Name: "app_01",
Output: "could not connect to something",
Source: cfg.AgentName,
Command: "command",
}
bytes, _ := json.Marshal(payload)
Expand Down Expand Up @@ -198,8 +198,8 @@ func TestHandleTCPMessagesNoSource(t *testing.T) {
}

payload := corev1.CheckResult{
Name: "app_01",
Output: "could not connect to something",
Name: "app_01",
Output: "could not connect to something",
Command: "command",
}
bytes, _ := json.Marshal(payload)
Expand Down Expand Up @@ -251,9 +251,9 @@ func TestHandleUDPMessages(t *testing.T) {
}

payload := corev1.CheckResult{
Name: "app_01",
Output: "could not connect to something",
Source: "proxyEnt",
Name: "app_01",
Output: "could not connect to something",
Source: "proxyEnt",
Command: "command",
}
bytes, _ := json.Marshal(payload)
Expand Down Expand Up @@ -349,9 +349,9 @@ func TestReceiveMultiWriteTCP(t *testing.T) {
}

payload := corev1.CheckResult{
Name: "app_01",
Output: "could not connect to something",
Source: "proxyEnt",
Name: "app_01",
Output: "could not connect to something",
Source: "proxyEnt",
Command: "command",
}
bytes, _ := json.Marshal(payload)
Expand Down
1 change: 1 addition & 0 deletions agent/statsd_server.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !solaris
// +build !solaris

// Package agent is the running Sensu agent. Agents connect to a Sensu backend,
Expand Down
1 change: 1 addition & 0 deletions agent/statsd_server_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build integration && !solaris
// +build integration,!solaris

package agent
Expand Down
1 change: 1 addition & 0 deletions asset/fetcher_unix.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !windows
// +build !windows

package asset
Expand Down
1 change: 1 addition & 0 deletions asset/fetcher_windows.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build windows
// +build windows

package asset
Expand Down
1 change: 1 addition & 0 deletions backend/apid/actions/actions_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !debug
// +build !debug

package actions
Expand Down
1 change: 1 addition & 0 deletions backend/apid/handlers/patch_integration_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build integration
// +build integration

package handlers
Expand Down
1 change: 1 addition & 0 deletions backend/backend_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build integration
// +build integration

package backend
Expand Down
1 change: 1 addition & 0 deletions backend/cmd/logger_unix.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !windows
// +build !windows

package cmd
Expand Down
1 change: 1 addition & 0 deletions backend/debug_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !debug
// +build !debug

package backend
Expand Down
1 change: 1 addition & 0 deletions backend/etcd/etcd_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build integration && !race
// +build integration,!race

package etcd
Expand Down
3 changes: 2 additions & 1 deletion backend/etcd/sequence_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//+build integration
//go:build integration
// +build integration

package etcd

Expand Down
1 change: 1 addition & 0 deletions backend/eventd/integration_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build integration
// +build integration

package eventd
Expand Down
1 change: 1 addition & 0 deletions backend/eventd/logger_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !windows
// +build !windows

package eventd
Expand Down
1 change: 1 addition & 0 deletions backend/keepalived/integration_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build integration
// +build integration

package keepalived
Expand Down
1 change: 1 addition & 0 deletions backend/liveness/liveness_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build integration
// +build integration

package liveness
Expand Down
1 change: 1 addition & 0 deletions backend/queue/queue_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build integration && !race
// +build integration,!race

package queue
Expand Down
1 change: 1 addition & 0 deletions backend/ringv2/pool_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build integration && !race
// +build integration,!race

package ringv2
Expand Down
1 change: 1 addition & 0 deletions backend/ringv2/ringv2_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build integration && !race
// +build integration,!race

// These tests are unfortunately quite slow. This is somewhat mitigated by the
Expand Down
1 change: 1 addition & 0 deletions backend/schedulerd/check_watcher_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build integration
// +build integration

package schedulerd
Expand Down
1 change: 1 addition & 0 deletions backend/schedulerd/debug_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !debug
// +build !debug

package schedulerd
Expand Down
1 change: 1 addition & 0 deletions backend/schedulerd/executor_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build integration
// +build integration

package schedulerd
Expand Down
1 change: 1 addition & 0 deletions backend/schedulerd/schedulerd_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build integration && !race
// +build integration,!race

package schedulerd
Expand Down
1 change: 1 addition & 0 deletions backend/store/cache/cache_integration_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build integration
// +build integration

package cache
Expand Down
1 change: 1 addition & 0 deletions backend/store/cache/v2/cache_integration_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build integration
// +build integration

package v2
Expand Down
1 change: 1 addition & 0 deletions backend/store/etcd/asset_store_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build integration && !race
// +build integration,!race

package etcd
Expand Down
1 change: 1 addition & 0 deletions backend/store/etcd/authentication_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build integration && !race
// +build integration,!race

package etcd
Expand Down
1 change: 1 addition & 0 deletions backend/store/etcd/check_store_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build integration && !race
// +build integration,!race

package etcd
Expand Down
1 change: 1 addition & 0 deletions backend/store/etcd/cluster_id_store_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build integration && !race
// +build integration,!race

package etcd
Expand Down
1 change: 1 addition & 0 deletions backend/store/etcd/debug_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !debug
// +build !debug

package etcd
Expand Down
1 change: 1 addition & 0 deletions backend/store/etcd/entity_store_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build integration && !race
// +build integration,!race

package etcd
Expand Down
1 change: 1 addition & 0 deletions backend/store/etcd/event_store_integration_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build integration && !race
// +build integration,!race

package etcd
Expand Down
1 change: 1 addition & 0 deletions backend/store/etcd/filter_store_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build integration && !race
// +build integration,!race

package etcd
Expand Down
1 change: 1 addition & 0 deletions backend/store/etcd/handler_store_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build integration && !race
// +build integration,!race

package etcd
Expand Down
1 change: 1 addition & 0 deletions backend/store/etcd/health_store_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build integration && !race
// +build integration,!race

package etcd
Expand Down
1 change: 1 addition & 0 deletions backend/store/etcd/hook_store_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build integration && !race
// +build integration,!race

package etcd
Expand Down
1 change: 1 addition & 0 deletions backend/store/etcd/keepalive_store_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build integration && !race
// +build integration,!race

package etcd
Expand Down
1 change: 1 addition & 0 deletions backend/store/etcd/migrations_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !race && integration
// +build !race,integration

package etcd
Expand Down
1 change: 1 addition & 0 deletions backend/store/etcd/mutator_store_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build integration && !race
// +build integration,!race

package etcd
Expand Down
1 change: 1 addition & 0 deletions backend/store/etcd/namespace_store_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build integration && !race
// +build integration,!race

package etcd
Expand Down
1 change: 1 addition & 0 deletions backend/store/etcd/resource_integration_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build integration && !race
// +build integration,!race

package etcd
Expand Down
1 change: 1 addition & 0 deletions backend/store/etcd/silenced_store_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build integration && !race
// +build integration,!race

package etcd
Expand Down
1 change: 1 addition & 0 deletions backend/store/etcd/store_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build integration && !race
// +build integration,!race

package etcd
Expand Down
1 change: 1 addition & 0 deletions backend/store/etcd/tessen_store_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build integration && !race
// +build integration,!race

package etcd
Expand Down
1 change: 1 addition & 0 deletions backend/store/etcd/user_store_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build integration && !race
// +build integration,!race

package etcd
Expand Down
1 change: 1 addition & 0 deletions backend/store/etcd/version_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build integration && !race
// +build integration,!race

package etcd
Expand Down
1 change: 1 addition & 0 deletions backend/store/etcd/watcher_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build integration && !race
// +build integration,!race

package etcd
Expand Down
1 change: 1 addition & 0 deletions backend/store/v2/etcdstore/store_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build integration && !race
// +build integration,!race

package etcdstore_test
Expand Down
1 change: 1 addition & 0 deletions backend/tessend/tessend_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build integration && !race
// +build integration,!race

package tessend
Expand Down
1 change: 1 addition & 0 deletions command/command_unix_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !windows
// +build !windows

package command
Expand Down
1 change: 1 addition & 0 deletions command/command_windows_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build windows
// +build windows

package command
Expand Down
1 change: 1 addition & 0 deletions command/proc_group_unix.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !linux && !windows
// +build !linux,!windows

package command
Expand Down
1 change: 1 addition & 0 deletions command/proc_unix.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !windows
// +build !windows

package command
Expand Down
1 change: 1 addition & 0 deletions command/proc_windows.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build windows
// +build windows

package command
Expand Down
1 change: 1 addition & 0 deletions system/cpu_arm.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build arm
// +build arm

package system
Expand Down
1 change: 1 addition & 0 deletions system/cpu_other.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !arm
// +build !arm

package system
Expand Down
Loading

0 comments on commit d9316a9

Please sign in to comment.