MCPcopy Create free account
hub / github.com/ejoffe/spr / check

Function check

github/githubclient/client.go:845–858  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

843}
844
845func check(err error) {
846 if err != nil {
847 msg := err.Error()
848 if strings.Contains(msg, "401 Unauthorized") {
849 errmsg := "error : 401 Unauthorized\n"
850 errmsg += " make sure GITHUB_TOKEN env variable is set with a valid token\n"
851 errmsg += " to create a valid token goto: https://github.com/settings/tokens\n"
852 fmt.Fprint(os.Stderr, errmsg)
853 os.Exit(-1)
854 } else {
855 panic(err)
856 }
857 }
858}

Callers 5

addStarMethod · 0.70
NewGitHubClientFunction · 0.70
GetInfoMethod · 0.70
CreatePullRequestMethod · 0.70
MergePullRequestMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected