1- # unitauto-go [ ![ ] ( https://jitpack.io/v/TommyLemon/unitauto-go.svg )] ( https://jitpack.io/#TommyLemon/unitauto-go )
1+ # unitauto-go
22UnitAuto Go 库,可通过 GitHub 仓库等远程依赖。<br />
33UnitAuto Go Library for remote dependencies with GitHub repo, etc.
44
5+ <img width =" 1495 " alt =" image " src =" https://user-images.githubusercontent.com/5738175/225639582-76f8cf99-d603-4d93-ae19-77b9fd278a42.png " >
6+ <img width =" 1495 " alt =" image " src =" https://user-images.githubusercontent.com/5738175/225637162-779e64ee-46f8-41a0-b91a-c0e66d291398.png " >
7+ <img width =" 1495 " alt =" image " src =" https://user-images.githubusercontent.com/5738175/225635650-f776dc3a-596c-4796-95d7-1ca1c2f02782.png " >
8+ <img width =" 1495 " alt =" image " src =" https://user-images.githubusercontent.com/5738175/225635800-5909dfb7-17c1-45e2-94e5-7c2251aa4500.png " >
9+ <img width =" 1495 " alt =" image " src =" https://user-images.githubusercontent.com/5738175/225636134-a4daf4ec-9304-44d2-b09a-28497c815188.png " >
10+ <img width =" 1495 " alt =" image " src =" https://user-images.githubusercontent.com/5738175/225636569-b508fa19-3973-4655-bd49-68742c4d09d0.png " >
11+
512#### 1. 在 go.mod 中添加 GitHub 仓库
613#### 1. Add the GitHub repository to go.mod
714``` go
@@ -23,3 +30,15 @@ UnitAuto Go Library for remote dependencies with GitHub repo, etc.
2330#### 3. Test by following the main repo
2431
2532https://github.com/TommyLemon/UnitAuto
33+
34+ 由于 Go 的反射限制,目前做不到像 Java, Kotlin 版几乎绝对零代码,还需要注册 func 和 struct 的实例,<br />
35+ 不过注册代码可以通过 UnitAuto-Admin 前端管理网页设置项 \[ 查看、同步方法文档] 来生成,复制粘贴到被测项目中:<br />
36+ Due to the limitation of Go, it's not almost absolutely coding free like Java and Kotlin, <br />
37+ and you need to write few code to register the funcs and structs to be tested. <br />
38+ However, the code can be generated by clicking the setting item [ View/Sync doc] of UnitAuto-Admin, <br />
39+ then you can copy and pasted the "ginCode" into the project under test instead of coding: <br />
40+
41+ https://github.com/TommyLemon/unitauto-go/blob/main/main.go
42+ <img width =" 1495 " alt =" image " src =" https://user-images.githubusercontent.com/5738175/225632360-ce953a58-22b1-4b4e-8b3d-0083edebc71a.png " >
43+ <img width =" 1495 " alt =" image " src =" https://user-images.githubusercontent.com/5738175/225635146-f8dab9d1-76c5-421a-b45e-732e4923fd4d.png " >
44+
0 commit comments