如何在Go中打开HTML文件

huangapple go评论83阅读模式
英文:

How to open html file in go

问题

我想在Go语言中打开一个HTML页面。我的项目目录是home/usr/go/project/,而我的HTML文件位于/home/usr/go/project/static/

我希望在程序启动时打开它。

英文:

I would like to open a html page in go. My project directory is home/usr/go/project/. And my html files are in /home/usr/go/project/static/.

I would like to open it as the program starts.

答案1

得分: 1

要实际打开一个URL(或文件,浏览器必须能够访问它),你可以使用:https://github.com/0x434D53/openinbrowser

英文:

For actually opening a URL (or file, the browser must ofc reach it) you can use: https://github.com/0x434D53/openinbrowser

huangapple
  • 本文由 发表于 2016年3月10日 20:08:08
  • 转载请务必保留本文链接:https://go.coder-hub.com/35916092.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定