How to embed file for later parsing execution use

前端 未结 3 915
轻奢々
轻奢々 2020-11-30 23:55

I am essentially trying to walk through a folder of html files. I want to embed them into the binary file and be able to parse them upon request for template execution purpo

3条回答
  •  攒了一身酷
    2020-12-01 00:48

    I made a package that makes switching between debug and production easier. It also provides an http.FileSystem implementation, making it easy to server the files. And it has several ways of adding the files to the binary (generate go code, or append as zip). https://github.com/GeertJohan/go.rice

提交回复
热议问题