校对了数据,上海的没啥问题,深圳的还不行

This commit is contained in:
钱纯净
2024-10-24 22:23:06 +08:00
parent 1bdc7ef8e1
commit 9c7923d939
6 changed files with 107 additions and 81 deletions

37
protocol/types.go Normal file
View File

@@ -0,0 +1,37 @@
package protocol
type Exchange uint8
func (this Exchange) Uint8() uint8 { return uint8(this) }
func (this Exchange) String() string {
switch this {
case ExchangeSH:
return "sh"
case ExchangeSZ:
return "sz"
case ExchangeBJ:
return "bj"
default:
return "unknown"
}
}
func (this Exchange) Name() string {
switch this {
case ExchangeSH:
return "上海"
case ExchangeSZ:
return "深圳"
case ExchangeBJ:
return "北京"
default:
return "未知"
}
}
const (
ExchangeSH Exchange = iota //上海交易所
ExchangeSZ //深圳交易所
ExchangeBJ //北京交易所
)