plugin 优化,增加demo

This commit is contained in:
李子铭 2024-07-02 17:15:21 +08:00
parent 18d02a9508
commit 99d26d1190
1 changed files with 12 additions and 11 deletions

View File

@ -7,23 +7,24 @@ import (
"log"
)
// main 这只是一个演示
func main() {
zltx()
}
func zltx() {
conf := &instance.PkgConf{
var conf = &instance.PkgConf{
Cmd: "pkg/zltx",
Tag: "zltx",
Version: 1,
CookieKey: "zltx",
CookieValue: "zltx",
}
// main 这只是一个演示
func main() {
err := instance.Load([]*instance.PkgConf{conf})
if err != nil {
panic(err)
}
zltx()
}
func zltx() {
res, err := instance.Order(context.Background(), conf.Tag, getOrderRequest())
if err != nil {
log.Fatalln(err)