watchgodoc

command module
v0.0.0-...-2e4a079 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 1, 2023 License: MIT Imports: 10 Imported by: 0

README

watchgodoc

?

watchgodoc is a tool that runs godoc server and watches for changes in the source code. When a change is detected, it kills the server and restarts it. Also, it relocates the browser to doc of the package that is changed.

cd your_go_project
go run github.com/umutbasal/watchgodoc@latest

.vscode/tasks.json to open the browser in vscode (CMD + SHIFT + P > RUN TASK > LIVE GO DOC)

{
    "version": "2.0.0",
    "cwd": "${workspaceFolder}",
    "tasks": [
        {
            "label": "Live Go Doc",
            "command": "${input:browser}",
            "problemMatcher": []
        },
    ],
    "inputs": [
        {
            "id": "browser",
            "type": "command",
            "command": "simpleBrowser.show",
            "args": [
                "http://localhost:6060/pkg/"
            ],
        }
    ]
}
image

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL