Hi, I’m very new to Go, I’m working with a repo URL but I want to ensure that my repo exists before I attempt to interact with it. Someone pointed me to https://github.com/google/go-github. I’ve already spent an hour going through the docs and I’m not sure what I am looking for
Sorry if this is a stupid question, but I don’t quite follow: What do you mean by “I want to ensure that my repo exists before I attempt to interact with it?” Can you just:
- Create the repo in GitHub
- Clone it
- Use it?
Hi Juan, are you trying to interact with the Github API through the Go-Github google bindings? If so, you can verify the repository, based on if the status code is 200 or 404. If it is a 404 then the application can’t reach the destination.
If however, this is not the question you are asking, then I agree with Skillian, it maybe best to re-phrase your question.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.