mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-21 08:29:24 +08:00
adjust parameter names
This commit is contained in:
@@ -2,13 +2,13 @@ package needle
|
||||
|
||||
import "strconv"
|
||||
|
||||
func ReadMemoryMapMaxSizeMB(MemoryMapMaxSizeMBString string) (uint32, error) {
|
||||
if MemoryMapMaxSizeMBString == "" {
|
||||
func ReadMemoryMapMaxSizeMb(MemoryMapMaxSizeMbString string) (uint32, error) {
|
||||
if MemoryMapMaxSizeMbString == "" {
|
||||
return 0, nil
|
||||
}
|
||||
var MemoryMapMaxSize64 uint64
|
||||
var err error
|
||||
MemoryMapMaxSize64, err = strconv.ParseUint(MemoryMapMaxSizeMBString, 10, 32)
|
||||
MemoryMapMaxSize64, err = strconv.ParseUint(MemoryMapMaxSizeMbString, 10, 32)
|
||||
MemoryMapMaxSize := uint32(MemoryMapMaxSize64)
|
||||
return MemoryMapMaxSize, err
|
||||
}
|
||||
|
@@ -3,7 +3,7 @@ package needle
|
||||
import "testing"
|
||||
|
||||
func TestMemoryMapMaxSizeReadWrite(t *testing.T) {
|
||||
memoryMapSize, _ := ReadMemoryMapMaxSizeMB("5000")
|
||||
memoryMapSize, _ := ReadMemoryMapMaxSizeMb("5000")
|
||||
if memoryMapSize != 5000 {
|
||||
t.Errorf("empty memoryMapSize:%v", memoryMapSize)
|
||||
}
|
||||
|
Reference in New Issue
Block a user