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