Skip to content

Commit 4e10951

Browse files
committed
Replace interface{} with any
1 parent bd665e7 commit 4e10951

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

internal/scti/handlers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ func getRoots(_ context.Context, opts *HandlerOptions, log *log, w http.Response
372372
rawCerts = append(rawCerts, cert.Raw)
373373
}
374374

375-
jsonMap := make(map[string]interface{})
375+
jsonMap := make(map[string]any)
376376
jsonMap[jsonMapKeyCertificates] = rawCerts
377377
enc := json.NewEncoder(w)
378378
err := enc.Encode(jsonMap)

internal/scti/handlers_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ func deadlineMatcher() gomock.Matcher {
570570
return dlMatcher{}
571571
}
572572

573-
func (d dlMatcher) Matches(x interface{}) bool {
573+
func (d dlMatcher) Matches(x any) bool {
574574
ctx, ok := x.(context.Context)
575575
if !ok {
576576
return false
@@ -632,9 +632,9 @@ func loadCertsIntoPoolOrDie(t *testing.T, certs []string) *x509util.PEMCertPool
632632

633633
// cmpMatcher is a custom gomock.Matcher that uses cmp.Equal combined with a
634634
// cmp.Comparer that knows how to properly compare proto.Message types.
635-
type cmpMatcher struct{ want interface{} }
635+
type cmpMatcher struct{ want any }
636636

637-
func (m cmpMatcher) Matches(got interface{}) bool {
637+
func (m cmpMatcher) Matches(got any) bool {
638638
return cmp.Equal(got, m.want, cmp.Comparer(proto.Equal))
639639
}
640640
func (m cmpMatcher) String() string {

internal/x509util/x509util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ func appendHexData(buf *bytes.Buffer, data []byte, count int, prefix string) {
118118
}
119119
}
120120

121-
func publicKeyToString(_ x509.PublicKeyAlgorithm, pub interface{}) string {
121+
func publicKeyToString(_ x509.PublicKeyAlgorithm, pub any) string {
122122
var buf bytes.Buffer
123123
switch pub := pub.(type) {
124124
case *rsa.PublicKey:

storage/gcp/dedup.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func (d *DedupStorage) Add(ctx context.Context, entries []dedup.LeafDedupInfo) e
8282
m = append(m, &spanner.MutationGroup{
8383
Mutations: []*spanner.Mutation{
8484
spanner.Insert("IDSeq", []string{"id", "h", "idx", "timestamp"},
85-
[]interface{}{0, e.LeafID, int64(e.Idx), int64(e.Timestamp)})},
85+
[]any{0, e.LeafID, int64(e.Idx), int64(e.Timestamp)})},
8686
})
8787
}
8888

0 commit comments

Comments
 (0)