Skip to content
✨ Publier v1 is live — a polished docs platform built for the open web.
On this page

publier extract go

Extract the public API of a Go module as JSON for the SDK reference

Overview

Extract the public API of a Go module as JSON for the SDK reference

Reads the module’s own source files, with no Go toolchain, no dependencies downloaded and no code run, and writes the JSON that `integrations.sdk` with `format: go` turns into SDK reference pages.

Usage

Terminal window
publier extract go [OPTIONS] [PATTERNS]...

Arguments

ArgumentDescription
[PATTERNS]...Package patterns relative to the module root: ./…, ./option, ./option/… or import paths (default ./…)

Options

OptionDescriptionDefaultChoices
-o, --output <FILE>Write the artifact to FILE instead of stdout
--exclude <LIST>Comma-separated package patterns to skip
--exclude-symbols <LIST>Comma-separated symbol patterns to skip: Name, Type.Member, or dir.Name, with path.Match wildcards
--comments <SYNTAX>Doc comment syntax: markdown keeps comment text as Markdown and resolves Go doc links; godoc reads it as a Go doc comment and prints Markdownmarkdownmarkdown, godoc
--goos <GOOS>GOOS used to select fileslinux
--goarch <GOARCH>GOARCH used to select filesamd64
--tags <LIST>Comma-separated build tags used to select files
--internalInclude internal packages
--no-parentRequire go.mod in the current directory instead of searching parent directories