godoc -write_index不执行任何操作。 我究竟做错了什么?

I'm trying to build documentation for the project I work on with godoc.

  • GO111MODULE=on
  • go version go1.12.1 linux/amd64

I use:

$ godoc -v -http=":8080" -analysis=type -goroot=$PWD -index 

It works. Although it takes ages to start and with -analysis=type,pointer even more.

I'm trying to save index with:

$ godoc -v -http=":8080" -analysis=type -goroot=$PWD -index -index_files=$PWD/doc/index.db -write_index 
# 2019/04/06 16:46:07 initialize file systems
# 2019/04/06 16:46:07 updating index...
# 2019/04/06 16:46:07 index updated (0.000290604s, 0 bytes of source, 0 files, 0 lines, 0 unique words, 0 spots)
# 2019/04/06 16:46:07 before GC: bytes = 3646032 footprint = 72284408
# 2019/04/06 16:46:07 after  GC: bytes = 3190736 footprint = 72284408
# 2019/04/06 16:46:07 writing index file [THE_PATH_TO_PROJECT]/doc/index.db
# 2019/04/06 16:46:07 done
$ wc --bytes ./doc/index.db 
# 1456 ./doc/index.db

It works less than a second doing exactly nothing.

What am I doing wrong?