mirror of
https://github.com/injoyai/tdx.git
synced 2025-11-26 21:25:35 +08:00
Compare commits
2 Commits
v0.0.52
...
1ff1ceb8d7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1ff1ceb8d7 | ||
|
|
233d1b689e |
@@ -14,7 +14,7 @@ import (
|
||||
"github.com/injoyai/ios/client"
|
||||
"github.com/injoyai/ios/module/common"
|
||||
"github.com/injoyai/logs"
|
||||
"github.com/injoyai/tdx/internal/bse"
|
||||
"github.com/injoyai/tdx/lib/bse"
|
||||
"github.com/injoyai/tdx/protocol"
|
||||
)
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@ import (
|
||||
"github.com/injoyai/ios"
|
||||
"github.com/injoyai/ios/client"
|
||||
"github.com/injoyai/logs"
|
||||
"github.com/injoyai/tdx/internal/gbbq"
|
||||
"github.com/injoyai/tdx/internal/xorms"
|
||||
"github.com/injoyai/tdx/lib/gbbq"
|
||||
"github.com/injoyai/tdx/lib/xorms"
|
||||
"github.com/injoyai/tdx/protocol"
|
||||
"github.com/robfig/cron/v3"
|
||||
"xorm.io/xorm"
|
||||
|
||||
29
example/GetETFCodeNumber/main.go
Normal file
29
example/GetETFCodeNumber/main.go
Normal file
@@ -0,0 +1,29 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/injoyai/logs"
|
||||
"github.com/injoyai/tdx"
|
||||
)
|
||||
|
||||
func main() {
|
||||
cs, err := tdx.NewCodes2()
|
||||
logs.PanicErr(err)
|
||||
|
||||
ls := cs.GetETFCodes()
|
||||
|
||||
shNumber := 0
|
||||
szNumber := 0
|
||||
for _, v := range ls {
|
||||
switch {
|
||||
case strings.HasPrefix(v, "sh"):
|
||||
shNumber++
|
||||
case strings.HasPrefix(v, "sz"):
|
||||
szNumber++
|
||||
}
|
||||
}
|
||||
|
||||
logs.Debug("sh:", shNumber)
|
||||
logs.Debug("sz:", szNumber)
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
package extend
|
||||
|
||||
import (
|
||||
"github.com/injoyai/tdx/internal/bse"
|
||||
"github.com/injoyai/tdx/lib/bse"
|
||||
)
|
||||
|
||||
func GetBjCodes() ([]string, error) {
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"github.com/injoyai/base/types"
|
||||
"github.com/injoyai/tdx/internal/zip"
|
||||
"github.com/injoyai/tdx/lib/zip"
|
||||
"io"
|
||||
"math"
|
||||
"net/http"
|
||||
@@ -286,7 +286,7 @@ func IsETF(code string) bool {
|
||||
return true
|
||||
|
||||
case code[0:2] == ExchangeSZ.String() &&
|
||||
(code[2:4] == "15" || code[2:4] == "16"):
|
||||
(code[2:4] == "15"):
|
||||
return true
|
||||
}
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user