godoc的HTTP服务器似乎无法实时重新加载更改。

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

godoc http server doesn't seem to live reload changes

问题

我似乎找不到关于这个问题的答案,godoc服务器是否支持实时重新加载更改以供我的项目使用?

根据这篇文章,它应该是支持的,但是每当我更改我的代码(更新文档)时,除非重新启动Web服务器,否则不会显示任何更改。

我的文档更新/出现在每次启动服务器时:

godoc -http=:6060 &

我不想为每个更改重新启动服务器,这是预期的行为吗?我该如何以最少的努力更新我的更改?

我的go版本:

$ go version
go version go1.8 darwin/amd64

使用隐身模式的浏览器:

Chrome Version 57.0.2987.133 (64-bit)
英文:

I seem to be unable to find an answer to the question, does the godoc server support live reload changes in for my own projects?

According to this article it should be supported however whenever I change my code (update documentation) no changes appear until restart of the web server

My documentation updates/appear every time I start the the sever:

godoc -http=:6060 &

I don't want to restart the server for every change, is this expected behavior, what can I do to update my changes with the least amount of effort?

My go version:

$ go version
go version go1.8 darwin/amd64

Using browser with incognito mode:

Chrome Version 57.0.2987.133 (64-bit)

答案1

得分: 2

"Directory /src/github.com/someuser" 顶部的目录的 Godoc 不会自动更新。

"Package yourthing" 顶部的包的 Godoc 会自动更新,但你必须重新加载页面才能看到变化。

英文:

Godoc for a directory ("Directory /src/github.com/someuser" at the top) does not automatically update.

Godoc for a package ("Package yourthing" at the top) will automatically update, but you must reload the page to see the change.

huangapple
  • 本文由 发表于 2017年4月21日 23:06:21
  • 转载请务必保留本文链接:https://go.coder-hub.com/43546113.html
匿名

发表评论

匿名网友

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

确定