in rellenv/appns/appns.go [49:73]
func (c *Fetcher) Get(id uint64) string {
for _, app := range c.Apps {
if app.ID() == id {
return app.Namespace()
}
}
if ns, ok := c.Cache.Get(cacheKey(id)); ok {
return ns.(string)
}
res := struct{ Namespace string }{""}
req := http.Request{
Method: "GET",
URL: &url.URL{Path: strconv.FormatUint(id, 10)},
}
_, err := c.FbApiClient.Do(&req, &res)
if err != nil {
c.Logger.Printf("Ignoring error API call for AppNamespace: %s", err)
return ""
}
c.Cache.Add(cacheKey(id), res.Namespace)
return res.Namespace
}