Skip to content

Commit

Permalink
interface{}->any for lint
Browse files Browse the repository at this point in the history
Signed-off-by: cs-308-2023 <adityaruhela2003@gmail.com>
  • Loading branch information
ADI-ROXX committed Jan 29, 2025
1 parent 6b68418 commit 1861fd4
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions cmd/query/app/http_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ type TQualityMetrics struct {

// BannerText stores the optional banner text with styling
type BannerText struct {
Value string `json:"value"`
Styling map[string]interface{} `json:"styling,omitempty"` // CSS properties as a map
Value string `json:"value"`
Styling map[string]any `json:"styling,omitempty"` // CSS properties as a map
}

// Score represents individual score entries.
Expand Down Expand Up @@ -128,20 +128,20 @@ type Detail struct {

// ColumnDef represents column definitions in details.
type ColumnDef struct {
Key string `json:"key"`
Label string `json:"label"`
PreventSort bool `json:"preventSort"`
Styling map[string]interface{} `json:"styling,omitempty"` // CSS properties as a map
Key string `json:"key"`
Label string `json:"label"`
PreventSort bool `json:"preventSort"`
Styling map[string]any `json:"styling,omitempty"` // CSS properties as a map
}

// Row represents a single row of data in details.
type Row map[string]interface{} // TRow is Record<string, TStyledValue | string | number | TExample[]>
type Row map[string]any // TRow is Record<string, TStyledValue | string | number | TExample[]>

// StyledValue represents a value that may include styling or a link.
type StyledValue struct {
LinkTo string `json:"linkTo"`
Styling map[string]interface{} `json:"styling"`
Value interface{} `json:"value"`
LinkTo string `json:"linkTo"`
Styling map[string]any `json:"styling"`
Value any `json:"value"`
}

// Example represents a sampe trace
Expand Down Expand Up @@ -637,7 +637,7 @@ func (aH *APIHandler) getQualityMetrics(w http.ResponseWriter, r *http.Request)
TraceQualityDocumentationLink: "https://example.com/trace-quality-docs",
BannerText: &BannerText{
Value: "Currently, this is dummy text",
Styling: map[string]interface{}{
Styling: map[string]any{
"color": "blue",
"fontWeight": "bold",
},
Expand Down

0 comments on commit 1861fd4

Please sign in to comment.