Skip to content

Commit 4af5e36

Browse files
committed
fix linter warns
1 parent bf5d58f commit 4af5e36

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

cmd/agent/main.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,9 @@ func (a *agent) handleFaultApply(w http.ResponseWriter, r *http.Request) {
116116
req.Interface = defaultInterface
117117
}
118118
if req.LatencyMs == 0 && req.PacketLoss == 0 && req.PacketCorruption == 0 && req.PacketDuplication == 0 {
119-
http.Error(w, "at least one of latencyMs, packetLoss, packetCorruption, or packetDuplication must be non-zero", http.StatusBadRequest)
119+
http.Error(w,
120+
"at least one of latencyMs, packetLoss, packetCorruption, or packetDuplication must be non-zero",
121+
http.StatusBadRequest)
120122
return
121123
}
122124

cmd/main.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,9 @@ func main() {
152152
"image", agentImage)
153153
}
154154

155-
if err := setupControllers(mgr, agentPort, secretToken, agentImage, injectionEnabled, agentDebug, webhookTimeout); err != nil {
155+
if err := setupControllers(
156+
mgr, agentPort, secretToken, agentImage, injectionEnabled, agentDebug, webhookTimeout,
157+
); err != nil {
156158
setupLog.Error(err, "Failed to register controllers or webhooks")
157159
os.Exit(1)
158160
}
@@ -217,7 +219,8 @@ func buildMetricsOptions(
217219

218220
// setupControllers registers all reconcilers and webhooks with the manager.
219221
func setupControllers(
220-
mgr ctrl.Manager, agentPort int, secretToken, agentImage string, injectionEnabled, agentDebug bool, webhookTimeout time.Duration,
222+
mgr ctrl.Manager, agentPort int, secretToken, agentImage string,
223+
injectionEnabled, agentDebug bool, webhookTimeout time.Duration,
221224
) error {
222225
if err := (&controller.ExperimentReconciler{
223226
Client: mgr.GetClient(),

0 commit comments

Comments
 (0)