help

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package help 承载 conduct 的长文档主题——教程 / 概念 / 最佳实践这类跨命令的深度内容。 各命令的 --help 只做精简速查(本命令怎么用);不适合塞进 --help 的长文档放这里, 经 `conduct help <主题>` 输出。文档用 go:embed 打进二进制:conduct 走 go install, 源码仓库的 docs/ 不随二进制发布,长文档必须内嵌才能被已安装的用户 / 沙箱 AI 读到。

本包只管内容与注册,不依赖 cobra;命令布线在 internal/cli/help.go。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Content

func Content(name string) (string, bool, error)

Content 返回指定主题的 markdown 正文;主题未登记时 ok=false(供调用方报「未知主题」)。 主题已登记却读不到内嵌文件属构建期不变量被破坏(.md 缺失或改名未同步登记), go:embed 会在编译期先行拦截;此处仍显式转译该错误上抛,不静默返回空串。

Types

type Topic

type Topic struct {
	Name  string // 调用名,如 "prompts"(→ conduct help prompts)
	Short string // 一行简介,列在主题清单里
	// contains filtered or unexported fields
}

Topic 是一个 help 主题:一份跨命令的长文档。

func Topics

func Topics() []Topic

Topics 返回全部已注册主题的只读快照(按登记顺序)。

Jump to

Keyboard shortcuts

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