How to build my own godoc

108 views
Skip to first unread message

FancyGo

unread,
Oct 20, 2016, 11:48:57 AM10/20/16
to golang-nuts
Hi all, I have download source code of godoc. But I have no idea how to build it. Because I have modified the source code, so I don't want use the bin godoc.

Pietro Gagliardi

unread,
Oct 20, 2016, 12:50:49 PM10/20/16
to FancyGo, golang-nuts
Where did you download it to, what file (absolute filename) did you modify, and what is your $GOPATH?
On Oct 20, 2016, at 3:05 AM, FancyGo <lin...@gmail.com> wrote:

Hi all, I have download source code of godoc. But I have no idea how to build it. Because I have modified the source code, so I don't want use the bin godoc.

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

FancyGo

unread,
Oct 20, 2016, 10:08:31 PM10/20/16
to golang-nuts, lin...@gmail.com
Download from github go-tool. Modified ~/gopkg/src/golang.org/x/tools/godoc/static/static.go. GOPATH is ~/gopkg

Pietro Gagliardi

unread,
Oct 20, 2016, 11:06:04 PM10/20/16
to FancyGo, golang-nuts
You can cd into ~/golang.org/x/tools/godoc and do go build to build a godoc in that directory.

go install golang.org/x/tools/godoc will also use your local modification of godoc, but I don't know where it installs to anymore.

FancyGo

unread,
Oct 21, 2016, 5:51:28 AM10/21/16
to golang-nuts
I have solved my problem. Build godoc in tools/cmd instead tools can solve.

在 2016年10月20日星期四 UTC+8下午11:48:57,FancyGo写道:
Reply all
Reply to author
Forward
0 new messages