Golang serve static files from memory

前端 未结 4 2009
忘了有多久
忘了有多久 2020-12-08 11:54

I have a quick question about serving files in Go. There is the great timesaving FileServer handler, but for my use case, I only have 2 or 3 files (js and css) that go with

4条回答
  •  感动是毒
    2020-12-08 12:14

    The "go.rice" package takes care of this for you - embedding resources in your binaries, and providing an http.FileSystem implementation.

提交回复
热议问题