Files
gostock/cmd/rk/main.go
2026-02-26 16:53:51 +08:00

18 lines
331 B
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package main
import (
"fmt"
"git.apinb.com/quant/gostock/internal/logic/libs"
)
func main() {
// 示例获取贵州茅台sh600519的最新价
price, err := libs.GetSinaStockPrice("600519.SH")
if err != nil {
fmt.Printf("获取失败: %v\n", err)
return
}
fmt.Printf("贵州茅台最新价: %.2f\n", price)
}