Skip to content

Latest commit

 

History

History
50 lines (35 loc) · 2 KB

File metadata and controls

50 lines (35 loc) · 2 KB

Local Go Pkgsite (local-pkgsite)

A local Go pkgsite serving the module documentation, with automatic browser refresh.

Example Usage

"features": {
    "ghcr.io/thediveo/devcontainer-features/local-pkgsite:0": {}
}

Options

Options Id Description Type Default Value
port TCP port serving packages documentation string 6060
reload-delay time in milliseconds to delay the reload event following file changes string 2000
reload-debounce time in milliseconds to restrict the frequency in which browser:reload events can be emitted to connected clients string 5000

OS Support

Tested with:

Acknowledgement

@mdaverde for his blog post Build your Golang package docs locally that forms the basis for this devcontainer feature.

Operation

The port configured with the port option is served by browser-sync, and browser-sync in turn proxies pkgsite. pkgsite is started with a random port from the ephemeral port range, this random port is determined once when the devcontainer starts and then kept constant. nodemon monitors your Go sources for changes and then triggers a browser refresh and pkgsite restart.


Note: This file was auto-generated from the devcontainer-feature.json. Add additional notes to a NOTES.md.