pkgsite

command
v0.0.0-...-86cb477 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: BSD-3-Clause Imports: 28 Imported by: 0

Documentation

Overview

Godep extracts and generates documentation for Go programs. It runs as a web server and presents the documentation as a web page.

To install, run `go install github.com/khulnasoft-lab/godep/cmd/godep@latest`.

With no arguments, godep will serve docs for main modules relative to the current directory, i.e. the modules listed by `go list -m`. This is typically the module defined by the nearest go.mod file in a parent directory. However, this may include multiple main modules when using a go.work file to define a workspace.

For example, both of the following forms could be used to work on the module defined in repos/cue/go.mod:

The single module form:

cd repos/cue && godep

The multiple module form:

go work init repos/cue repos/other && godep

By default, the resulting server will also serve all of the module's dependencies at their required versions. You can disable serving the required modules by passing -list=false.

You can also serve docs from your module cache, directly from the proxy (it uses the GOPROXY environment variable), or both:

godep -cache -proxy

With either -cache or -proxy, godep won't look for a module in the current directory. You can still provide modules on the local filesystem by listing their paths:

godep -cache -proxy ~/repos/cue some/other/module

Although standard library packages will work by default, the docs can take a while to appear the first time because the Go repo must be cloned and processed. If you clone the repo yourself (https://go.googlesource.com/go), you can provide its location with the -gorepo flag to save a little time.

Jump to

Keyboard shortcuts

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