Skip to content

Commit b80853d

Browse files
committedMar 17, 2022
all: gofmt -w -r 'interface{} -> any' .
Updates #9687
1 parent 423594e commit b80853d

File tree

342 files changed

+2118
-2102
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

342 files changed

+2118
-2102
lines changed
 

‎bufferpool/bufpool.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
)
2121

2222
var bufferPool = &sync.Pool{
23-
New: func() interface{} {
23+
New: func() any {
2424
return &bytes.Buffer{}
2525
},
2626
}

‎cache/namedmemcache/named_cache.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ type Cache struct {
3030
}
3131

3232
type cacheEntry struct {
33-
value interface{}
33+
value any
3434
err error
3535
}
3636

@@ -55,7 +55,7 @@ func (c *Cache) Clear() {
5555
// create will be called and cached.
5656
// This method is thread safe. It also guarantees that the create func for a given
5757
// key is invoked only once for this cache.
58-
func (c *Cache) GetOrCreate(key string, create func() (interface{}, error)) (interface{}, error) {
58+
func (c *Cache) GetOrCreate(key string, create func() (any, error)) (any, error) {
5959
c.mu.RLock()
6060
entry, found := c.cache[key]
6161
c.mu.RUnlock()

0 commit comments

Comments
 (0)
Please sign in to comment.