mirror of
https://github.com/injoyai/tdx.git
synced 2025-11-26 21:25:35 +08:00
优化extend.GetBjCodes,直接输出代码
This commit is contained in:
@@ -4,6 +4,14 @@ import (
|
||||
"github.com/injoyai/tdx"
|
||||
)
|
||||
|
||||
func GetBjCodes() ([]*tdx.BjCode, error) {
|
||||
return tdx.GetBjCodes()
|
||||
func GetBjCodes() ([]string, error) {
|
||||
cs, err := tdx.GetBjCodes()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
ls := []string(nil)
|
||||
for _, v := range cs {
|
||||
ls = append(ls, "bj"+v.Code)
|
||||
}
|
||||
return ls, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user