如何在公共仓库中使用Go Doc

I've some question regard godoc . I have a private git repository and I want to make it public. How does the documentation work? I've used the command godoc -html my-tool/cmd> doc.html to generate it locally make fixes etc, but when we go public how the docs will be there , should I do something or this is automatically generated from public function etc?

Should I submit the generated local doc file either? I guess not but not sure...

You don't need to do anything. godoc.org will automatically fetch your doc the first time it's requested, and frequently updates its cache, in case of changes to your package.