Skip to content

Commit 3637328

Browse files
committed
chore: interface{} -> any in comments
Tiny left over from #4750 Signed-off-by: Solomon Jacobs <solomonjacobs@protonmail.com>
1 parent f656273 commit 3637328

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

api/v2/restapi/configure_alertmanager.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func configureAPI(api *operations.AlertmanagerAPI) http.Handler {
4343
api.ServeError = errors.ServeError
4444

4545
// Set your custom logger if needed. Default one is log.Printf
46-
// Expected interface func(string, ...interface{})
46+
// Expected interface func(string, ...any)
4747
//
4848
// Example:
4949
// api.Logger = log.Printf

notify/jira/jira.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ func (n *Notifier) prepareIssueRequestBody(_ context.Context, logger *slog.Logge
134134
return issue{}, fmt.Errorf("issue_type template: %w", err)
135135
}
136136

137-
// Recursively convert any maps to map[string]interface{}, filtering out all non-string keys, so the json encoder
137+
// Recursively convert any maps to map[string]any, filtering out all non-string keys, so the json encoder
138138
// doesn't blow up when marshaling JIRA requests.
139139
fieldsWithStringKeys, err := tcontainer.ConvertToMarshalMap(n.conf.Fields, func(v string) string { return v })
140140
if err != nil {

template/template.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ type TemplateFunc func(string) (string, error)
434434

435435
// deepCopyWithTemplate returns a deep copy of a map/slice/array/string/int/bool or combination thereof, executing the
436436
// provided template (with the provided data) on all string keys or values. All maps are connverted to
437-
// map[string]interface{}, with all non-string keys discarded.
437+
// map[string]any, with all non-string keys discarded.
438438
func DeepCopyWithTemplate(value any, tmplTextFunc TemplateFunc) (any, error) {
439439
if value == nil {
440440
return value, nil

0 commit comments

Comments
 (0)