|
@@ -40,3 +40,15 @@ func GetCurrentAbPathByExecutable() string {
|
|
|
res, _ := filepath.EvalSymlinks(filepath.Dir(exePath))
|
|
|
return res
|
|
|
}
|
|
|
+
|
|
|
+func Int2Bytes(i int) [4]byte {
|
|
|
+ var result [4]byte
|
|
|
+ result[0] = byte(i >> 24 & 0xFF)
|
|
|
+ result[1] = byte(i >> 16 & 0xFF)
|
|
|
+ result[2] = byte(i >> 8 & 0xFF)
|
|
|
+ result[3] = byte(i & 0xFF)
|
|
|
+ return result
|
|
|
+}
|
|
|
+func Bytes2HexStr(bytes [4]byte) {
|
|
|
+
|
|
|
+}
|