28 lines
465 B
Go
28 lines
465 B
Go
package rule
|
|
|
|
import (
|
|
"strings"
|
|
|
|
"git.apinb.com/quant/gostock/internal/logic/types"
|
|
)
|
|
|
|
type ST struct {
|
|
Key string
|
|
Name string
|
|
}
|
|
|
|
func NewST() *ST {
|
|
return &ST{
|
|
Key: "ST",
|
|
Name: "ST",
|
|
}
|
|
}
|
|
|
|
func (r *ST) Run(in string) *types.RuleResult {
|
|
if strings.Contains(in, "ST") {
|
|
return &types.RuleResult{Key: r.Key, Name: r.Name, Score: -1, Desc: "有退市风险"}
|
|
}
|
|
|
|
return &types.RuleResult{Key: r.Key, Name: r.Name, Score: 1, Desc: "无退市风险"}
|
|
}
|