adjust parameter names

This commit is contained in:
Chris Lu
2019-10-21 22:57:01 -07:00
parent d16c450682
commit faec9076a4
16 changed files with 320 additions and 324 deletions

View File

@@ -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
}

View File

@@ -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)
}