-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from muskankhedia/type-flex
Fixed address calls in intermediate-decimal
- Loading branch information
Showing
5 changed files
with
177 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
warehouse/ | ||
gobase/warehouse/ | ||
gobase/warehouse/ | ||
test.go | ||
tests/warehouse | ||
tests/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,156 @@ | ||
package gobase | ||
|
||
import "strconv" | ||
|
||
//SaveArrUint8 ... | ||
func SaveArrUint8(path *string, data *[]uint8) bool{ | ||
|
||
preCondition(path) | ||
|
||
dataInString := func(data *[]uint8) *[]string { | ||
|
||
var temp *[]string | ||
for _,ele := range *data{ | ||
*temp = append(*temp, strconv.Itoa(int(ele))) | ||
} | ||
return temp | ||
}(data) | ||
|
||
return SaveArr(path, *dataInString) | ||
} | ||
|
||
//SaveArrUint16 ... | ||
func SaveArrUint16(path *string, data *[]uint16) bool{ | ||
|
||
preCondition(path) | ||
|
||
dataInString := func(data *[]uint16) *[]string { | ||
|
||
var temp *[]string | ||
for _,ele := range *data{ | ||
*temp = append(*temp, strconv.Itoa(int(ele))) | ||
} | ||
return temp | ||
}(data) | ||
|
||
return SaveArr(path, *dataInString) | ||
} | ||
|
||
//SaveArrUint32 ... | ||
func SaveArrUint32(path *string, data *[]uint32) bool{ | ||
|
||
preCondition(path) | ||
|
||
dataInString := func(data *[]uint32) *[]string { | ||
|
||
var temp *[]string | ||
for _,ele := range *data{ | ||
*temp = append(*temp, strconv.Itoa(int(ele))) | ||
} | ||
return temp | ||
}(data) | ||
|
||
return SaveArr(path, *dataInString) | ||
} | ||
|
||
//SaveArrUint64 ... | ||
func SaveArrUint64(path *string, data *[]uint64) bool{ | ||
|
||
preCondition(path) | ||
|
||
dataInString := func(data *[]uint64) *[]string { | ||
|
||
var temp *[]string | ||
for _,ele := range *data{ | ||
*temp = append(*temp, strconv.Itoa(int(ele))) | ||
} | ||
return temp | ||
}(data) | ||
|
||
return SaveArr(path, *dataInString) | ||
} | ||
|
||
//SaveArrInt8 ... | ||
func SaveArrInt8(path *string, data *[]int8) bool{ | ||
|
||
preCondition(path) | ||
|
||
dataInString := func(data *[]int8) *[]string { | ||
|
||
var temp *[]string | ||
for _,ele := range *data{ | ||
*temp = append(*temp, strconv.Itoa(int(ele))) | ||
} | ||
return temp | ||
}(data) | ||
|
||
return SaveArr(path, *dataInString) | ||
} | ||
|
||
//SaveArrInt16 ... | ||
func SaveArrInt16(path *string, data *[]int16) bool{ | ||
|
||
preCondition(path) | ||
|
||
dataInString := func(data *[]int16) *[]string { | ||
|
||
var temp *[]string | ||
for _,ele := range *data{ | ||
*temp = append(*temp, strconv.Itoa(int(ele))) | ||
} | ||
return temp | ||
}(data) | ||
|
||
return SaveArr(path, *dataInString) | ||
} | ||
|
||
//SaveArrInt32 ... | ||
func SaveArrInt32(path *string, data *[]int32) bool{ | ||
|
||
preCondition(path) | ||
|
||
dataInString := func(data *[]int32) *[]string { | ||
|
||
var temp *[]string | ||
for _,ele := range *data{ | ||
*temp = append(*temp, strconv.Itoa(int(ele))) | ||
} | ||
return temp | ||
}(data) | ||
|
||
return SaveArr(path, *dataInString) | ||
} | ||
|
||
//SaveArrInt64 ... | ||
func SaveArrInt64(path *string, data *[]int64) bool{ | ||
|
||
preCondition(path) | ||
|
||
dataInString := func(data *[]int64) *[]string { | ||
|
||
var temp *[]string | ||
for _,ele := range *data{ | ||
*temp = append(*temp, strconv.Itoa(int(ele))) | ||
} | ||
return temp | ||
}(data) | ||
|
||
return SaveArr(path, *dataInString) | ||
} | ||
|
||
//SaveArrInt ... | ||
func SaveArrInt(path *string, data *[]int) bool{ | ||
|
||
preCondition(path) | ||
|
||
dataInString := func(data *[]int) *[]string { | ||
|
||
var temp *[]string | ||
for _,ele := range *data{ | ||
*temp = append(*temp, strconv.Itoa(ele)) | ||
} | ||
return temp | ||
}(data) | ||
|
||
return SaveArr(path, *dataInString) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters