Help us shape the future of Go! Take the 2026 Go Developer Survey

docs

package
v1.44.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package docs defines the root Cobra command and all subcommands for the stripe docs subcommand. Commands are methods on RootCommand, which holds shared dependencies injected via [WithOptions].

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*RootCommand)

Option is a functional option for configuring RootCommand.

func WithClient

func WithClient(client *pkgdocs.Client) Option

WithClient sets the docs HTTP client used to fetch pages.

func WithConfig

func WithConfig(cfg *cliconfig.Config) Option

WithConfig sets the shared Stripe CLI configuration whose fields are populated by cobra flag parsing at runtime (e.g. --color, --log-level).

func WithLogger

func WithLogger(logger *log.Entry) Option

WithLogger sets the logger.

func WithRenderer

func WithRenderer(renderer markdown.Renderer) Option

WithRenderer sets the Markdown renderer used to display pages.

type RootCommand

type RootCommand struct {
	// contains filtered or unexported fields
}

RootCommand is the root command for the docs subcommand.

func New

func New() *RootCommand

New creates a new RootCommand with sensible defaults.

func (*RootCommand) Root

func (r *RootCommand) Root() *cobra.Command

Root returns the cobra command, used by tools like the doc generator.

func (*RootCommand) WithOptions

func (r *RootCommand) WithOptions(opts ...Option) *RootCommand

WithOptions applies the given options to the RootCommand.

Jump to

Keyboard shortcuts

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