MCPcopy Create free account
hub / github.com/bare-cli/bare / GetRecipe

Function GetRecipe

utils/parser/parser.go:43–58  ·  view source on GitHub ↗
(user string, repo string, branch string)

Source from the content-addressed store, hash-verified

41}
42
43func GetRecipe(user string, repo string, branch string) {
44 req_url := raw_url + user + "/" + repo + "/" + branch + "/recipe.json"
45 resp, err := http.Get(req_url)
46 if err != nil {
47 log.Fatal(err)
48 }
49 body, err := ioutil.ReadAll(resp.Body)
50 if err != nil {
51 log.Fatalln(err)
52 }
53 //Convert the body to type string
54 err = json.Unmarshal(body, &BareObj)
55 if err != nil {
56 log.Fatal(err)
57 }
58}
59
60// Return user, repo, branch
61func ParseGithubRepo(bareName string) (string, string, string) {

Callers 2

InfoBareFunction · 0.92
useBareFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected