Removed the max/min family of functions (#28679)
They are in-built in Go now ```release-note NONE ```
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
4440ace6a9
Коммит
3db139f746
@@ -303,7 +303,7 @@ func New(sc ServiceConfig, options ...Option) (*PlatformService, error) {
|
||||
Name: "Status",
|
||||
Size: model.StatusCacheSize,
|
||||
Striped: true,
|
||||
StripedBuckets: maxInt(runtime.NumCPU()-1, 1),
|
||||
StripedBuckets: max(runtime.NumCPU()-1, 1),
|
||||
DefaultExpiry: 30 * time.Minute,
|
||||
})
|
||||
if err != nil {
|
||||
@@ -314,7 +314,7 @@ func New(sc ServiceConfig, options ...Option) (*PlatformService, error) {
|
||||
Name: "Session",
|
||||
Size: model.SessionCacheSize,
|
||||
Striped: true,
|
||||
StripedBuckets: maxInt(runtime.NumCPU()-1, 1),
|
||||
StripedBuckets: max(runtime.NumCPU()-1, 1),
|
||||
})
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not create session cache: %w", err)
|
||||
|
||||
Ссылка в новой задаче
Block a user