{"id":85275,"date":"2020-04-01T16:35:05","date_gmt":"2020-04-01T08:35:05","guid":{"rendered":"http:\/\/4563.org\/?p=85275"},"modified":"2020-04-01T16:35:05","modified_gmt":"2020-04-01T08:35:05","slug":"go-sword-%e5%9f%ba%e4%ba%8e-go-%e8%af%ad%e8%a8%80%e7%9a%84%e5%8f%af%e8%a7%86%e5%8c%96-web-%e7%ae%a1%e7%90%86%e5%90%8e%e5%8f%b0%e7%94%9f%e6%88%90%e5%b7%a5%e5%85%b7-%ef%bc%8c%e7%a8%8b%e5%ba%8f%e5%91%98","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=85275","title":{"rendered":"Go-sword \u57fa\u4e8e Go \u8bed\u8a00\u7684\u53ef\u89c6\u5316 web \u7ba1\u7406\u540e\u53f0\u751f\u6210\u5de5\u5177 \uff0c\u7a0b\u5e8f\u5458\u7684\u798f\u97f3\u554a~"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  Go-sword \u57fa\u4e8e Go \u8bed\u8a00\u7684\u53ef\u89c6\u5316 web \u7ba1\u7406\u540e\u53f0\u751f\u6210\u5de5\u5177 \uff0c\u7a0b\u5e8f\u5458\u7684\u798f\u97f3\u554a~               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : sunshinev <\/span>  <span><i><\/i> 13<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p><img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/05\/20200516_5ebfb97cba31f.jpg\" alt=\"Go-sword \u57fa\u4e8e Go \u8bed\u8a00\u7684\u53ef\u89c6\u5316 web \u7ba1\u7406\u540e\u53f0\u751f\u6210\u5de5\u5177 \uff0c\u7a0b\u5e8f\u5458\u7684\u798f\u97f3\u554a~\" \/><\/p>\n<p>Go-sword(\u5229\u5203)\u662f\u4e00\u6b3e\u57fa\u4e8e Go \u8bed\u8a00\u7684\u53ef\u89c6\u5316 web \u7ba1\u7406\u540e\u53f0\u751f\u6210\u5de5\u5177<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/05\/20200516_5ebfb981523f5.svg\" alt=\"Go-sword \u57fa\u4e8e Go \u8bed\u8a00\u7684\u53ef\u89c6\u5316 web \u7ba1\u7406\u540e\u53f0\u751f\u6210\u5de5\u5177 \uff0c\u7a0b\u5e8f\u5458\u7684\u798f\u97f3\u554a~\" \/> <img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/05\/20200516_5ebfb984dab1c.svg\" alt=\"Go-sword \u57fa\u4e8e Go \u8bed\u8a00\u7684\u53ef\u89c6\u5316 web \u7ba1\u7406\u540e\u53f0\u751f\u6210\u5de5\u5177 \uff0c\u7a0b\u5e8f\u5458\u7684\u798f\u97f3\u554a~\" \/> <img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/05\/20200516_5ebfb9895cfdd.svg\" alt=\"Go-sword \u57fa\u4e8e Go \u8bed\u8a00\u7684\u53ef\u89c6\u5316 web \u7ba1\u7406\u540e\u53f0\u751f\u6210\u5de5\u5177 \uff0c\u7a0b\u5e8f\u5458\u7684\u798f\u97f3\u554a~\" \/> <img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/05\/20200516_5ebfb98ce7a36.svg\" alt=\"Go-sword \u57fa\u4e8e Go \u8bed\u8a00\u7684\u53ef\u89c6\u5316 web \u7ba1\u7406\u540e\u53f0\u751f\u6210\u5de5\u5177 \uff0c\u7a0b\u5e8f\u5458\u7684\u798f\u97f3\u554a~\" \/> <img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/05\/20200516_5ebfb99113c25.svg\" alt=\"Go-sword \u57fa\u4e8e Go \u8bed\u8a00\u7684\u53ef\u89c6\u5316 web \u7ba1\u7406\u540e\u53f0\u751f\u6210\u5de5\u5177 \uff0c\u7a0b\u5e8f\u5458\u7684\u798f\u97f3\u554a~\" \/><\/p>\n<p>\u5b98\u65b9\u7f51\u7ad9 https:\/\/sunshinev.github.io\/go-sword-home\/<\/p>\n<p>\u5979\u80fd\u6ee1\u8db3\u4f60\u54ea\u4e9b\uff1f<\/p>\n<ol>\n<li>\u4f60\u6709\u4ee3\u7801\u6d01\u7656\uff0c\u4e0d\u5e0c\u671b\u5de5\u5177\u8fc7\u591a\u5e72\u6270\u4f60\u7684\u4e1a\u52a1\u903b\u8f91<\/li>\n<li>\u4f60\u5e0c\u671b\u751f\u6210\u7684\u9875\u9762\u53ef\u4ee5\u81ea\u5b9a\u4e49\u4fee\u6539\uff0c\u6765\u5b9e\u73b0\u66f4\u591a\u7684\u529f\u80fd<\/li>\n<li>\u4f60\u5e0c\u671b\u4ee3\u7801\u7279\u522b\u7b80\u5355\u6613\u8bfb\uff0c\u4e14\u5bb9\u6613\u81ea\u5b9a\u4e49<\/li>\n<li>\u4f60\u5e0c\u671b\u80fd\u5feb\u901f\u6784\u5efa\u7ba1\u7406\u540e\u53f0\uff0c\u54ea\u6015\u4ec5\u4ec5\u662f\u5c06\u6570\u636e\u5e93\u91cc\u7684\u6570\u636e\u53ef\u89c6\u5316<\/li>\n<li>\u4f60\u5e0c\u671b\u4e00\u952e\u751f\u6210 CRUD\uff0c\u65e0\u9700\u590d\u6742\u64cd\u4f5c<\/li>\n<li>\u4f60\u5e0c\u671b\u4f7f\u7528 iView \u7684\u7ec4\u4ef6\uff0c\u5feb\u901f\u6784\u5efa\u9875\u9762<\/li>\n<\/ol>\n<p>\u90a3\u4e48 go-sword \u53ef\u4ee5\u6ee1\u8db3\u4f60<\/p>\n<p>\u6839\u636e MySQL \u7684\u8868\u7ed3\u6784\uff0c\u521b\u5efa\u5b8c\u6574\u7684\u7ba1\u7406\u540e\u53f0\u754c\u9762\uff0c\u5f00\u53d1\u8005\u65e0\u9700\u518d\u91cd\u590d\u624b\u52a8\u7684\u521b\u5efa\u5177\u6709 CRUD \u80fd\u529b\u7684\u9875\u9762 \u53ea\u9700\u8981\u70b9\u51fb\u6309\u94ae\u5373\u53ef\u751f\u6210\u5b8c\u6574\u7684\u7ba1\u7406\u540e\u53f0<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/05\/20200516_5ebfb9955d8d8.jpg\" alt=\"Go-sword \u57fa\u4e8e Go \u8bed\u8a00\u7684\u53ef\u89c6\u5316 web \u7ba1\u7406\u540e\u53f0\u751f\u6210\u5de5\u5177 \uff0c\u7a0b\u5e8f\u5458\u7684\u798f\u97f3\u554a~\" \/><\/p>\n<h2>\u7279\u70b9<\/h2>\n<ol>\n<li>\u4e00\u952e\u751f\u6210\uff0c\u65e0\u9700\u5199\u4e00\u884c\u4ee3\u7801<\/li>\n<li>\u652f\u6301\u589e\u52a0\u3001\u5220\u9664\u3001\u7f16\u8f91\u3001\u5217\u8868\u3001\u6279\u91cf\u5220\u9664\u3001\u5206\u9875\u3001\u68c0\u7d22<\/li>\n<li>\u9875\u9762\u57fa\u4e8e Vue.js + iView<\/li>\n<li>\u9488\u5bf9\u6bcf\u4e2a\u6570\u636e\u8868\u90fd\u751f\u6210\u4e86\u5355\u72ec\u7684\u903b\u8f91\u6587\u4ef6\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u6c42\u4f7f\u7528 Vue \u6216\u8005 iView \u6765\u5b9e\u73b0\u529f\u80fd\u66f4\u52a0\u4e30\u5bcc\u7684\u9875\u9762<\/li>\n<\/ol>\n<p><img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/05\/20200516_5ebfb99a2c593.jpg\" alt=\"Go-sword \u57fa\u4e8e Go \u8bed\u8a00\u7684\u53ef\u89c6\u5316 web \u7ba1\u7406\u540e\u53f0\u751f\u6210\u5de5\u5177 \uff0c\u7a0b\u5e8f\u5458\u7684\u798f\u97f3\u554a~\" \/><\/p>\n<h2>\u5f00\u59cb<\/h2>\n<h3>\u5b89\u88c5<\/h3>\n<pre><code>go get -u  github.com\/sunshinev\/go-sword <\/code><\/pre>\n<h3>\u7f16\u8bd1<\/h3>\n<pre><code>go build <\/code><\/pre>\n<p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u786e\u4fdd<code>go-sword<\/code>\u547d\u4ee4\u5728<code>GOPATH\/bin<\/code>\u76ee\u5f55\u4e0b\uff0c\u53ef\u6267\u884c<\/p>\n<h3>\u542f\u52a8\u670d\u52a1<\/h3>\n<pre><code>go-sword -db {db_database} -password {db_password} -user {db_uesr} -module {module_name} <\/code><\/pre>\n<p>\u4f8b\u5982\uff1a<code>go-sword -db blog -password 123456 -user root -module go-sword-app<\/code><\/p>\n<p>\u4ee5\u4e0a\u547d\u4ee4\uff0c\u5c31\u662f\u8fde\u63a5\u6570\u636e\u5e93<code>blog<\/code>\uff0c\u7528\u6237\u540d<code>root<\/code>,\u5bc6\u7801<code>12345<\/code>,\u5728 go-sword \u547d\u4ee4\u7684\u5f53\u524d\u76ee\u5f55\u4e0b\u521b\u5efa\u9879\u76ee<code>go-sword-app<\/code><\/p>\n<p>\u542f\u52a8\u6210\u529f\u7684\u63d0\u793a<\/p>\n<pre><code>Go-Sword will create new project named go-sword-app in current directory  [Server info] Server port : 8080 Project module : go-sword-app  [db info] MySQL host : localhost MySQL port : 3306 MySQL user : root MySQL password : 123456  Start successful, server is running ... Please request: http:\/\/localhost:8080 <\/code><\/pre>\n<h4>\u53c2\u6570\u8bf4\u660e<\/h4>\n<pre><code>+---------------------------------------------------+ |                                                   | |            Welcome to use Go-Sword                | |                                                   | |                Visualized tool                    | |        Fastest to create CRUD background          | |      https:\/\/github.com\/sunshinev\/go-sword        | |                                                   | +---------------------------------------------------+ Usage of go-sword:   \/\/ \u8981\u8fde\u63a5\u7684\u6570\u636e\u5e93\u4fe1\u606f   -db string       MySQL database   -host string       MySQL Host (default \"localhost\")   \/\/ \u91cd\u8981\uff1amodule \u53c2\u6570\u5355\u72ec\u4f5c\u89e3\u91ca   -module string       New project module, the same as  'module' in go.mod file.   (default \"go-sword-app\/\")   \/\/ go-sword \u670d\u52a1\u542f\u52a8\u7684\u9ed8\u8ba4\u7aef\u53e3   -p string       Go-sword Server port (default \"8080\")   -password string       MySQL password   -port int       MySQL port (default 3306)   -user string       MySQL user <\/code><\/pre>\n<h4>\u53c2\u6570\uff1a -module<\/h4>\n<p><code>-module<\/code> \u53c2\u6570\u662f\u4ee3\u8868\u8981\u521b\u5efa\u7684\u9879\u76ee\u540d\u79f0\uff0c\u540c\u65f6\u4e5f\u662f\u65b0\u9879\u76ee<code>go.mod<\/code>\u6587\u4ef6\u4e2d\u7684<code>module<\/code>\u5b57\u6bb5\u7684\u503c\uff0c\u8fd9\u70b9\u8bf7\u52a1\u5fc5\u4fdd\u6301\u4e00\u81f4\u3002<\/p>\n<h4>\u6ce8\u610f<\/h4>\n<p>\u65b0\u9879\u76ee\u4f1a\u5728\u8fd0\u884c<code>go-sword<\/code>\u547d\u4ee4\u7684\u5f53\u524d\u76ee\u5f55\u4e0b\uff0c\u76f4\u63a5\u521b\u5efa<code>module<\/code>\u76ee\u5f55\uff0c\u4f5c\u4e3a\u65b0\u9879\u76ee<\/p>\n<h3>\u5f00\u59cb\u4f7f\u7528\u670d\u52a1<\/h3>\n<pre><code>Start successful, server is running ... Please request: http:\/\/localhost:8080 <\/code><\/pre>\n<p>\u6839\u636e\u670d\u52a1\u542f\u52a8\u7684\u63d0\u793a\uff0c\u76f4\u63a5\u70b9\u51fb<code>http:\/\/localhost:8080<\/code>\u5373\u53ef\u8fdb\u5165 web \u7684\u53ef\u89c6\u5316\u5de5\u5177\u9875\u9762<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/05\/20200516_5ebfb99f5f7be.jpg\" alt=\"Go-sword \u57fa\u4e8e Go \u8bed\u8a00\u7684\u53ef\u89c6\u5316 web \u7ba1\u7406\u540e\u53f0\u751f\u6210\u5de5\u5177 \uff0c\u7a0b\u5e8f\u5458\u7684\u798f\u97f3\u554a~\" \/><\/p>\n<h4>\u91cd\u8981\uff1a\u9875\u9762\u529f\u80fd\u4ecb\u7ecd<\/h4>\n<ol>\n<li>\u9996\u5148\u4e0b\u62c9\u9009\u62e9 MySQL \u7684\u8868\u683c\uff0c\u7136\u540e\u70b9\u51fb<code>Preview<\/code>\u6309\u94ae\uff0c\u5373\u53ef\u6e32\u67d3\u51fa\u9700\u8981\u521b\u5efa\u7684\u6587\u4ef6<\/li>\n<li>\u9996\u6b21\u521b\u5efa\u65b0\u9879\u76ee\u6587\u4ef6\u9700\u8981\u70b9\u51fb<code>select all<\/code>\u5168\u90e8\u9009\u62e9\uff0c\u9996\u6b21\u521b\u5efa\u5305\u542b\u4e86\u9879\u76ee\u542f\u52a8\u5fc5\u9700\u7684\u6838\u5fc3\u6587\u4ef6<\/li>\n<li>\u70b9\u51fb<code>Generate<\/code>\u6309\u94ae\uff0c\u65e2\u53ef\u4ee5\u770b\u5230\u63d0\u793a\u6587\u4ef6\u521b\u5efa\u6210\u529f<\/li>\n<li>\u5230\u76ee\u524d\u4e3a\u6b62\uff0c\u6211\u4eec\u7684\u540e\u53f0\u5df2\u7ecf\u521b\u5efa\u6210\u529f\u4e86<\/li>\n<\/ol>\n<p>\u6ce8\u610f\uff1a<\/p>\n<ol>\n<li>\u9996\u6b21\u521b\u5efa\uff0c\u6587\u4ef6\u9700\u8981\u5168\u90e8\u9009\u62e9<\/li>\n<li>\u5982\u679c\u521b\u5efa\u7b2c\u4e8c\u4e2a\u7ba1\u7406\u9875\u9762\uff0c\u90a3\u4e48\u53ef\u4ee5\u53ea\u9009\u62e9 <code>select diff &amp; new<\/code>\u6309\u94ae\uff0c\u7136\u540e\u70b9\u51fb<code>Generate<\/code>\u6309\u94ae<\/li>\n<li>\u6bcf\u6b21\u751f\u6210\u65b0\u7684\u7ba1\u7406\u754c\u9762\u540e\uff0c\u8bf7\u91cd\u542f\u65b0\u521b\u5efa\u7684\u9879\u76ee<\/li>\n<\/ol>\n<h2>\u5f00\u59cb\u4f7f\u7528\u65b0\u9879\u76ee<\/h2>\n<p>\u8fdb\u5165\u5230\u6211\u4eec\u65b0\u521b\u5efa\u7684\u9879\u76ee\u76ee\u5f55<\/p>\n<pre><code>\u279c  test tree -L 2 . \u2514\u2500\u2500 go-sword-app     \u251c\u2500\u2500 controller     \u251c\u2500\u2500 core     \u251c\u2500\u2500 go.mod     \u251c\u2500\u2500 go.sum     \u251c\u2500\u2500 main.go     \u251c\u2500\u2500 model     \u251c\u2500\u2500 resource     \u251c\u2500\u2500 route     \u2514\u2500\u2500 view <\/code><\/pre>\n<p>\u6bd4\u5982\u8bf4\u6211\u4eec\uff0c\u521a\u521a\u662f\u5728<code>test<\/code>\u76ee\u5f55\u8fd0\u884c\u7684<code>go-sword<\/code>\u547d\u4ee4\uff0c\u521b\u5efa\u7684\u9879\u76ee\u5c31\u662f<code>test\/go-sword-app<\/code><\/p>\n<p>\u6211\u4eec\u8fdb\u5165<code>test\/go-sword-app<\/code>\u76ee\u5f55\u4e0b\u6309\u7167\u4ee5\u4e0b\u547d\u4ee4\u542f\u52a8\u9879\u76ee<\/p>\n<h3>\u521d\u59cb\u5316\u65b0\u9879\u76ee go mod init<\/h3>\n<p>\u5229\u7528<code>go mod<\/code>\u521d\u59cb\u5316\u9879\u76ee\uff0c\u8fd9\u91cc\u7684<code>module<\/code>\u5c31\u662f\u6211\u4eec\u524d\u9762\u8bb2\u5230\u7684\u8981\u4e0e\u9879\u76ee\u540d\u79f0\u4fdd\u6301\u4e00\u81f4\uff01\uff01<\/p>\n<pre><code>go mod init {module} <\/code><\/pre>\n<h3>\u542f\u52a8\u9879\u76ee<\/h3>\n<pre><code>go run main.go <\/code><\/pre>\n<p>\u7136\u540e\u4f1a\u770b\u5230\u4e0b\u9762\u7684\u63d0\u793a\uff0c\u70b9\u51fb<code>http:\/\/localhost:8082<\/code>\u65e2\u53ef\u4ee5\u8fdb\u5165\u540e\u53f0\u7ba1\u7406\u754c\u9762<\/p>\n<pre><code>Enjoy your system ^ ^ Generated by Go-sword https:\/\/github.com\/sunshinev\/go-sword  [Server info] Server port : 8082  [db info] MySQL host : localhost MySQL port : 3306 MySQL user : root MySQL password : 123456  Start successful, server is running ... Please request: http:\/\/localhost:8082 <\/code><\/pre>\n<h3>\u7ba1\u7406\u540e\u53f0\u6548\u679c<\/h3>\n<ol>\n<li>\u540e\u7aef\u62a5\u9519\u63d0\u9192<\/li>\n<li>\u589e\u52a0\u3001\u5220\u9664\u3001\u7f16\u8f91\u3001\u5217\u8868\u3001\u6279\u91cf\u5220\u9664\u3001\u5206\u9875\u3001\u68c0\u7d22<\/li>\n<\/ol>\n<p><img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/05\/20200516_5ebfb9a2a91b2.jpg\" alt=\"Go-sword \u57fa\u4e8e Go \u8bed\u8a00\u7684\u53ef\u89c6\u5316 web \u7ba1\u7406\u540e\u53f0\u751f\u6210\u5de5\u5177 \uff0c\u7a0b\u5e8f\u5458\u7684\u798f\u97f3\u554a~\" \/><\/p>\n<h2>\u4e00\u4e9b\u95ee\u9898<\/h2>\n<ol>\n<li>\u56e0\u4e3a golang \u7684 map \u7ed3\u6784\u904d\u5386\u4e71\u5e8f\u7684\u95ee\u9898\uff0c\u90e8\u5206\u9875\u9762\u8f93\u51fa\u7684\u5b57\u6bb5\u987a\u5e8f\u4e0d\u80fd\u4fdd\u8bc1\u548c\u6570\u636e\u5e93\u5b57\u6bb5\u987a\u5e8f\u4e00\u81f4<\/li>\n<li>\u5173\u4e8e<code>module<\/code>\u7684\u53c2\u6570\uff0c\u53ef\u80fd\u8fd8\u4f1a\u6709\u66f4\u597d\u7684\u89e3\u51b3\u65b9\u6848<\/li>\n<li>\u6ca1\u6709\u63d0\u4f9b\u7528\u6237\u6ce8\u518c\u3001\u767b\u5f55\u7684\u80fd\u529b\uff0c\u8fd9\u4e5f\u4e0d\u7b26\u5408\u521d\u8877\uff0c\u6700\u5f00\u59cb\u5c31\u662f\u60f3\u505a\u7684\u66f4\u52a0\u57fa\u7840\uff0c\u5feb\u901f\u521b\u5efa\u9875\u9762<\/li>\n<li>\u751f\u6210\u7684\u9879\u76ee\u4ee3\u7801\uff0c\u8fd8\u6709\u5f88\u5927\u7684\u4f18\u5316\u7a7a\u95f4<\/li>\n<\/ol>\n<h2>\u9875\u9762\u529f\u80fd\u5c55\u793a<\/h2>\n<h3>\u5217\u8868<\/h3>\n<p><img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/05\/20200516_5ebfb9a7b4179.jpg\" alt=\"Go-sword \u57fa\u4e8e Go \u8bed\u8a00\u7684\u53ef\u89c6\u5316 web \u7ba1\u7406\u540e\u53f0\u751f\u6210\u5de5\u5177 \uff0c\u7a0b\u5e8f\u5458\u7684\u798f\u97f3\u554a~\" \/><\/p>\n<h3>\u5220\u9664<\/h3>\n<p><img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/05\/20200516_5ebfb9ac51dc4.jpg\" alt=\"Go-sword \u57fa\u4e8e Go \u8bed\u8a00\u7684\u53ef\u89c6\u5316 web \u7ba1\u7406\u540e\u53f0\u751f\u6210\u5de5\u5177 \uff0c\u7a0b\u5e8f\u5458\u7684\u798f\u97f3\u554a~\" \/><\/p>\n<h3>\u9884\u89c8<\/h3>\n<p><img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/05\/20200516_5ebfb9af9af93.jpg\" alt=\"Go-sword \u57fa\u4e8e Go \u8bed\u8a00\u7684\u53ef\u89c6\u5316 web \u7ba1\u7406\u540e\u53f0\u751f\u6210\u5de5\u5177 \uff0c\u7a0b\u5e8f\u5458\u7684\u798f\u97f3\u554a~\" \/><\/p>\n<h3>\u7f16\u8f91<\/h3>\n<p><img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/05\/20200516_5ebfb9b4bed54.jpg\" alt=\"Go-sword \u57fa\u4e8e Go \u8bed\u8a00\u7684\u53ef\u89c6\u5316 web \u7ba1\u7406\u540e\u53f0\u751f\u6210\u5de5\u5177 \uff0c\u7a0b\u5e8f\u5458\u7684\u798f\u97f3\u554a~\" \/><\/p>\n<h2>Go-sword fork<\/h2>\n<p>\u5982\u679c\u60f3\u8981\u81ea\u5b9a\u4e49\u7684\u8bdd\uff0c\u90a3\u4e48\u9700\u8981\u6ce8\u610f\uff0cGo-sword \u9879\u76ee\u53ef\u4ee5\u6253\u5305\u6210\u4e00\u4e2a\u90a3\u5355\u72ec\u7684\u547d\u4ee4\u6765\u6267\u884c\uff0c\u56e0\u4e3a\u5c06\u6240\u6709\u7684\u9759\u6001\u6587\u4ef6\u4e5f\u8fdb\u884c\u4e86\u6253\u5305<\/p>\n<p>\u9759\u6001\u6587\u4ef6\u538b\u7f29\u547d\u4ee4\u5982\u4e0b\uff1a<\/p>\n<pre><code>go-bindata -o assets\/resource\/dist.go -pkg resource resource\/dist\/... <\/code><\/pre>\n<pre><code>go-bindata -o assets\/stub\/stub.go -pkg stub stub\/... <\/code><\/pre>\n<pre><code>go-bindata -o assets\/view\/view.go -pkg view view\/... <\/code><\/pre>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>12<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"1411322\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ikaros <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8fd9\u5b98\u7f51\u505a\u5f97\u771f\u4e0d\u9519,\u7b49\u7ec6\u770b\u4e00\u4e0b\u3002\u987a\u5e26\u95ee\u4e00\u4e0b\u652f\u6301 json \u5b57\u6bb5\u5417? \u6211\u73b0\u5728\u7528\u7684 qor admin(gorm \u90a3\u5957), \u8fd9\u4e2a\u73b0\u5728\u6709\u4e2a\u95ee\u9898\u5c31\u662f json \u5b57\u6bb5\u53ea\u80fd\u505a\u6210\u6587\u672c\u6846\u8f93\u5165, \u800c\u4e14\u4e0d\u80fd\u5728\u65b0\u589e\u548c\u4fee\u6539\u4e4b\u540e\u505a\u4e00\u4e9b\u81ea\u5b9a\u4e49\u64cd\u4f5c                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1411323\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : dodo2012 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f18\u79c0\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1411324\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ila <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u70b9\u8d5e\uff0c\u5df2 star                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1411325\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ArJun <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8f6e\u5b50\u7684\u60f3\u6cd5\u4e0d\u9519\uff0c\u652f\u6301                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1411326\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Smash <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8bbe\u8ba1\u662f\u4e3b\u81ea\u5df1\u641e\u7684\u5417\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1411327\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : forrestshuang <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8f6e\u5b50\u4e0d\u9519\uff0c\u975e\u5e38\u5408\u9002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1411328\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : tikazyq <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u7c7b\u4f3c\u4e8e fuckdb                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1411329\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : sunshinev <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @ikaros \u5982\u679c\u8981\u5b58\u50a8 json \u7684\u8bdd\uff0c\u53ef\u4ee5\u901a\u8fc7 iView \u5c06\u6587\u672c\u6846\u7684\u5b57\u6bb5\u4fee\u6539\u4e3a type=textarea\uff0c\u90a3\u4e48\u5176\u5b9e json \u4f1a\u4f5c\u4e3a\u5b57\u7b26\u4e32\u5b58\u50a8\u5728 mysql \u4e2d\u7684\u3002\u56e0\u4e3a\u6bcf\u4e00\u4e2a\u5b57\u6bb5\u5b9e\u9645\u4e0a\u90fd\u4f1a\u6620\u5c04\u5230 golang \u7684 struct\uff0c\u5982\u679c\u8981\u60f3\u5728\u524d\u7aef\u76f4\u63a5\u7f16\u8f91 json \u5e76\u4e14\u8ba9\u6bcf\u4e2a\u5b57\u6bb5\u90fd\u6620\u5c04\u5230 mysql \u7684\u5b57\u6bb5\u7684\u8bdd\uff0c\u76ee\u524d\u751f\u6210\u7684\u9875\u9762\u4e0d\u652f\u6301~\u4e0d\u8fc7\u53ef\u4ee5\u7a0d\u4f5c\u4fee\u6539\u561b~ go-sword \u7684\u6700\u5927\u7684\u597d\u5904\u5c31\u662f\u6bcf\u4e2a\u9875\u9762\u53ef\u4ee5\u81ea\u5b9a\u4e49~                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1411330\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : sunshinev <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @Smash go-sword \u662f\u4f7f\u7528 Vue.js + iView4.0 \u6784\u5efa\u7684\uff0c\u6240\u4ee5\u4f7f\u7528\u7684\u662f iView4.0 \u7684\u4e3b\u9898~ \u524d\u7aef\u4ee3\u7801\u4e5f\u5728\u9879\u76ee\u91cc\u6253\u5305\u4e86\uff0c\u5982\u679c\u9700\u8981\u8c03\u6574\u6216\u8005\u66f4\u6362\u76ae\u80a4\u53ef\u4ee5\u91cd\u65b0 yarn build~                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1411331\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : sunshinev <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @ArJun go-sword \u5c31\u662f\u5954\u7740\u6700\u7b80\u5355\uff0c\u6700\u8f7b\u7684\u76ee\u7684\uff0c\u5982\u679c\u6709\u4ee3\u7801\u6d01\u7656\uff0c\u4e0d\u5e0c\u671b\u5de5\u5177\u8fc7\u591a\u7684\u5e72\u6270\u4f60\u7684\u4e1a\u52a1\uff0c\u6bd4\u5982\u8bf4\u5c31\u662f\u8981\u4e2a\u9875\u9762\uff0c\u767b\u5f55\u7684\u903b\u8f91\u3001\u7528\u6237\u7684\u903b\u8f91\u3001\u8fd9\u4e9b\u90fd\u5e0c\u671b\u81ea\u5df1\u6765\u5b9e\u73b0\uff0c\u90a3\u5c31\u7279\u522b\u9002\u5408 go-sword\uff0c\u800c\u4e14 go-sword \u6ca1\u6709\u57fa\u4e8e\u4efb\u4f55\u6846\u67b6\uff0c\u6bd4\u5982 Gin \u3001beego \u7b49\u3002\u5982\u679c\u4f5c\u4e3a\u4e00\u4e2a\u8f6e\u5b50\u4e5f\u53ef\u4ee5 fork \u540e\u505a\u81ea\u5b9a\u4e49\uff0c\u6bd4\u5982\u751f\u6210\u7684\u4ee3\u7801\u6309\u7167\u81ea\u5df1\u7684\u98ce\u683c\u6765\u6539\u9020~\u53ef\u80fd\u4f1a\u66f4\u52a0\u5f3a\u5927\uff0c\u63d0\u9ad8\u5de5\u4f5c\u6548\u7387\u5566~                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1411332\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : sunshinev <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @tikazyq \u521a\u770b\u4e86\u4e0b fuckdb\uff0c\u5e94\u8be5\u662f\u6839\u636e\u6570\u636e\u5e93\u7684\u8868\u683c\u6765\u751f\u6210 struct \u7ed3\u6784\u4f53\uff0c\u8fd9\u4e2a\u5728 go-sword \u4e2d\u4f7f\u7528\u7684\u662f db2struct \u4f5c\u4e3a\u89e3\u6790\u5305\u7684\uff0c \u5e76\u4e14\u5bf9 db2struct \u7684\u4ee3\u7801\u505a\u4e86\u4e00\u4e9b\u8c03\u6574\uff0c\u6765\u6ee1\u8db3\u524d\u7aef\u7684\u7ed3\u6784\u4f53\u89e3\u6790\u7684\u5b57\u6bb5\u7c7b\u578b\u6620\u5c04~<\/p>\n<p>fuckdb \u662f\u751f\u6210 struct \u7ed3\u6784\u4f53\u4ee3\u7801                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1411333\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : sunshinev <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @tikazyq \u4e0d\u597d\u610f\u601d\uff0c\u521a\u56de\u4e86\u4e00\u534a\u5c31\u6309\u4e86\u56de\u8f66\u3002\u3002\u3002\u521a\u521a\u8bf4\u5230 db2struct\uff0c\u5b9e\u9645\u4e0a go-sword \u662f\u6839\u636e mysql \u7684\u6570\u636e\u8868\u6765\u751f\u6210\u5b8c\u6574\u7684 CRUD webUI \u7684\u7ba1\u7406\u540e\u53f0\u7684~                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>Go-sword \u57fa\u4e8e Go \u8bed\u8a00&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/85275"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=85275"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/85275\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=85275"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=85275"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=85275"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}