增加获取所有股票代码的接口

This commit is contained in:
injoyai
2024-10-28 14:15:37 +08:00
parent ec6e93d845
commit c5cfc2bc98
13 changed files with 84 additions and 81 deletions

View File

@@ -10,18 +10,22 @@ import (
"io"
)
// String 字节先转小端,再转字符
func String(bs []byte) string {
return string(bytes2.Reverse(bs))
}
// Bytes 任意类型转小端字节
func Bytes(n any) []byte {
return bytes2.Reverse(conv.Bytes(n))
}
// Uint32 字节通过小端方式转为uint32
func Uint32(bs []byte) uint32 {
return conv.Uint32(bytes2.Reverse(bs))
}
// Uint16 字节通过小端方式转为uint16
func Uint16(bs []byte) uint16 {
return conv.Uint16(bytes2.Reverse(bs))
}