feat(cmd): remove fang, add explicit man subcommand and plain cobra execution#169
Merged
Conversation
Closes #165 - Add cmd/man package with NewManCmd() constructor - Wire into GetRootCmd() alongside existing subcommands - Promote mango-cobra and roff to direct dependencies - Update TestGetRootCmd_HasSubcommands to assert man is registered
…utput Closes #166 - Set SilenceUsage, SilenceErrors, Version on root command in GetRootCmd - Execute() calls root.ExecuteContext directly; renders errors via OutputWriter - Remove fang import and drop fang/charmtone from go.mod
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #164
Closes #165
Closes #166
Closes #167
Summary
Removes
charmbracelet/fangand replaces its four useful behaviors with explicit project-owned code, as specified in #164.Changes
cmd/man(new package) — closes #165NewManCmd()— hidden cobra subcommand, no args, writes roff man page content to stdout viamango-cobra+roffGetRootCmd()alongside existing subcommandscmd/root.go— closes #166GetRootCmd()now setsSilenceUsage,SilenceErrors, andVersiondirectly on the root commandExecute()callsroot.ExecuteContext(ctx)directly; on error renders a single styled line to stderr viaOutputWriter.Error()fangimport removedDependency cleanup — closes #167
github.com/charmbracelet/fangremoved fromgo.modgithub.com/muesli/mango-cobraandgithub.com/muesli/roffpromoted from indirect to direct depscolorprofile,ultraviolet,charmbracelet/x/*) pruned fromgo.sumTesting
cmd/man: hidden flag, no-args enforcement, non-empty roff output to stdoutcmd/root:SilenceUsage,SilenceErrors,Versionasserted on root command;manadded toTestGetRootCmd_HasSubcommandsmise run devpipeline passes end-to-end (generate → lint → test → snapshot → mock)