MCPcopy Create free account
hub / github.com/cli/cli / cmdReset

Function cmdReset

script/ghmock/log.go:155–171  ·  view source on GitHub ↗
(args []string, stdout io.Writer)

Source from the content-addressed store, hash-verified

153}
154
155func cmdReset(args []string, stdout io.Writer) error {
156 if askedForHelp(args) {
157 return flag.ErrHelp
158 }
159 if len(args) > 0 {
160 return newUsageError("reset takes no arguments")
161 }
162 st, err := openState()
163 if err != nil {
164 return err
165 }
166 if err := st.reset(); err != nil {
167 return err
168 }
169 fmt.Fprintf(stdout, "Deleted responses, request log and saved runs in %s\n", st.dir)
170 return nil
171}

Callers 3

TestCmdSetAndResetFunction · 0.85
TestRunAllFunction · 0.85
runMainFunction · 0.85

Calls 4

askedForHelpFunction · 0.85
newUsageErrorFunction · 0.85
openStateFunction · 0.85
resetMethod · 0.80

Tested by 2

TestCmdSetAndResetFunction · 0.68
TestRunAllFunction · 0.68