Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: remove config from help template #41

Merged
merged 3 commits into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions application.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,22 +337,6 @@ func (a *application) setupCommand(cmd *cobra.Command, flags *pflag.FlagSet, fn
return cmd
}

func (a *application) summarizeConfig(cmd *cobra.Command) string {
cfg := a.setupConfig.FangsConfig

summary := "Application Configuration:\n\n"
summary += indent.String(" ", strings.TrimSuffix(fangs.SummarizeCommand(cfg, cmd, a.state.Config.FromCommands...), "\n"))
summary += "\n"
summary += "Config Search Locations:\n"
for _, f := range fangs.SummarizeLocations(cfg) {
if !strings.HasSuffix(f, ".yaml") {
continue
}
summary += " - " + f + "\n"
}
return strings.TrimSpace(summary)
}

func async(cmd *cobra.Command, args []string, f func(cmd *cobra.Command, args []string) error) <-chan error {
errs := make(chan error)
go func() {
Expand Down
76 changes: 0 additions & 76 deletions help_template.go

This file was deleted.

86 changes: 0 additions & 86 deletions help_template_test.go

This file was deleted.

2 changes: 1 addition & 1 deletion setup_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,5 +123,5 @@ func (c *SetupConfig) WithGlobalLoggingFlags() *SetupConfig {
}

func (c *SetupConfig) WithConfigInRootHelp() *SetupConfig {
return c.withPostConstructs(updateHelpUsageTemplate, showConfigInRootHelp)
return c
}
Loading