MCPcopy Create free account
hub / github.com/basecamp/hey-cli / newConfigShowCommand

Function newConfigShowCommand

internal/cmd/config.go:62–90  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

60 output.WithSummary(fmt.Sprintf("Set %s = %s", key, value)),
61 )
62 },
63 }
64}
65
66func newConfigTrustLocalCommand() *cobra.Command {
67 return &cobra.Command{
68 Use: "trust-local",
69 Short: "Trust this repository's local HEY settings",
70 Args: cobra.NoArgs,
71 RunE: func(cmd *cobra.Command, _ []string) error {
72 local := cfg.LocalConfig()
73 if local == nil {
74 return output.ErrUsage("no local .hey/config.json with a server or account setting was found")
75 }
76 if err := cfg.TrustLocalConfig(); err != nil {
77 return err
78 }
79 if writer.IsStyled() {
80 fmt.Fprintf(cmd.OutOrStdout(), "Trusted local HEY configuration: %s\n", terminalSafeText(local.Path))
81 return nil
82 }
83 return writeOK(cfg.LocalConfig(), output.WithSummary("Trusted local HEY configuration"))
84 },
85 }
86}
87
88func newConfigUntrustLocalCommand() *cobra.Command {
89 return &cobra.Command{
90 Use: "untrust-local",
91 Short: "Remove trust for this repository's local HEY settings",
92 Args: cobra.NoArgs,
93 RunE: func(cmd *cobra.Command, _ []string) error {

Callers 1

newConfigCommandFunction · 0.85

Calls 7

WithSummaryFunction · 0.92
newTableFunction · 0.85
writeOKFunction · 0.85
SourceOfMethod · 0.80
IsStyledMethod · 0.80
addRowMethod · 0.80
printMethod · 0.80

Tested by

no test coverage detected