2020-10-09 21:32:46 +08:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"encoding/base64"
|
2020-10-10 13:51:55 +08:00
|
|
|
"fmt"
|
2020-10-09 21:32:46 +08:00
|
|
|
"io/ioutil"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2020-10-20 09:54:05 +08:00
|
|
|
bdsqls()
|
|
|
|
bdzip()
|
|
|
|
}
|
|
|
|
|
|
|
|
func bdsqls() {
|
|
|
|
bts, _ := ioutil.ReadFile("doc/sys.sql")
|
|
|
|
ioutil.WriteFile("comm/dbfl.go",
|
|
|
|
[]byte(fmt.Sprintf("package comm\n\nconst sqls = `\n%s\n`", string(bts))),
|
|
|
|
0644)
|
|
|
|
}
|
|
|
|
func bdzip() {
|
2020-10-09 21:51:11 +08:00
|
|
|
bts, _ := ioutil.ReadFile("uis/vue-admin/dist/dist.zip")
|
2020-10-09 21:32:46 +08:00
|
|
|
cont := base64.StdEncoding.EncodeToString(bts)
|
2020-10-10 13:51:55 +08:00
|
|
|
ioutil.WriteFile("comm/vuefl.go",
|
|
|
|
[]byte(fmt.Sprintf("package comm\n\nconst StaticPkg = \"%s\"", cont)),
|
|
|
|
0644)
|
2020-10-09 21:32:46 +08:00
|
|
|
}
|