Skip to content

Commit 6b9bc02

Browse files
committed
refactor(admin): replace interface{} with any
Use modern Go 'any' alias in place of interface{} in dataplane summary endpoint.
1 parent fd74714 commit 6b9bc02

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

internal/admin/server_dataplane.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func (s *Server) handleDataplanes(w http.ResponseWriter, r *http.Request) {
1919
}
2020

2121
w.Header().Set("Content-Type", "application/json")
22-
json.NewEncoder(w).Encode(map[string]interface{}{
22+
json.NewEncoder(w).Encode(map[string]any{
2323
"dataplanes": endpoints,
2424
})
2525
}
@@ -56,7 +56,7 @@ func (s *Server) handleDataplaneSummary(w http.ResponseWriter, r *http.Request)
5656
return
5757
}
5858

59-
var summary map[string]interface{}
59+
var summary map[string]any
6060
if err := s.dataplaneClient.GetJSON(r.Context(), targetEndpoint.URL, "/v1/summary", &summary); err != nil {
6161
http.Error(w, `{"error":"failed to get summary: `+err.Error()+`"}`, http.StatusInternalServerError)
6262
return

0 commit comments

Comments
 (0)