README.md 576 B

go-bindata

web项目资源文件打包进二进制中

Develop

go mod init my-go-project
go get github.com/gin-gonic/gin

export PATH=$PATH:$(go env GOPATH)/bin


GOPROXY=https://mirrors.aliyun.com/goproxy/,direct;GO111MODULE=auto
GOPROXY=https://goproxy.cn,direct;GO111MODULE=auto

go get -u github.com/go-bindata/go-bindata/...
go get github.com/elazarl/go-bindata-assetfs/...


静态打包
go-bindata-assetfs -o=vue/vue.go -pkg=vue vue/dist/...

go-bindata -o bindata.go -pkg main assets/...

go build
go run main.go bindata.go

License

Reference