From 99d26d1190a629b8e59835d8808ab386486be5f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=AD=90=E9=93=AD?= <zi__mm@163.com> Date: Tue, 2 Jul 2024 17:15:21 +0800 Subject: [PATCH] =?UTF-8?q?plugin=20=E4=BC=98=E5=8C=96,=E5=A2=9E=E5=8A=A0d?= =?UTF-8?q?emo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/main.go | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/cmd/main.go b/cmd/main.go index b4ac94f..bf7198c 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -7,23 +7,24 @@ import ( "log" ) -// main 这只是一个演示 -func main() { - zltx() +var conf = &instance.PkgConf{ + Cmd: "pkg/zltx", + Tag: "zltx", + Version: 1, + CookieKey: "zltx", + CookieValue: "zltx", } -func zltx() { - 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)