MCPcopy Create free account
hub / github.com/bluekeyes/patch2pr / die

Function die

cmd/patch2pr/main.go:27–41  ·  view source on GitHub ↗
(code int, err error)

Source from the content-addressed store, hash-verified

25)
26
27func die(code int, err error) {
28 fmt.Fprintln(os.Stderr, "error:", err)
29
30 if isCode(err, http.StatusNotFound) {
31 fmt.Fprint(os.Stderr, `
32This may be because the repository does not exist or the token you are using
33does not have write permission. If submitting a patch to a repository where you
34do not have write access, consider using the -fork flag to submit the patch
35from a fork.
36`,
37 )
38 }
39
40 os.Exit(code)
41}
42
43type Options struct {
44 BaseBranch string

Callers 1

mainFunction · 0.85

Calls 1

isCodeFunction · 0.85

Tested by

no test coverage detected