dongzen7263 2017-01-09 00:02
浏览 317
已采纳

将多个图像打包到GOLANG二进制文件中

GOLANG gurus:

I know this might seem illogical, but here it goes.

I have to distribute a binary (which in this case would be a webserver) to other engineers for testing. To keep it simple, because they might not be developers, I wanted to see if there might be some automated way to pack images into a GOLANG binary ? I've done this static HTML pages in the past, and it works great.

Obviously, at first run I could unzip to the file system, but to keep things clean I was trying to see if anyone has any thoughts how I could stuff them into a binary.

Any Ideas ?

  • 写回答

1条回答 默认 最新

  • dougan4663 2017-01-09 00:25
    关注

    You could use the same tools you used for HTML files... I'm assuming you used something like:

    Which essentially transform your files in go source code and the expose an http.FileSystem-like API for reading your data.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 用visual studi code完成html页面
  • ¥15 聚类分析或者python进行数据分析
  • ¥15 逻辑谓词和消解原理的运用
  • ¥15 三菱伺服电机按启动按钮有使能但不动作
  • ¥15 js,页面2返回页面1时定位进入的设备
  • ¥50 导入文件到网吧的电脑并且在重启之后不会被恢复
  • ¥15 (希望可以解决问题)ma和mb文件无法正常打开,打开后是空白,但是有正常内存占用,但可以在打开Maya应用程序后打开场景ma和mb格式。
  • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝
  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?