INNER CODE UNIT · Go
RIDToPath
resgateio/resgate · server/apiEncoding.go:116
func RIDToPath(rid, prefix string) string {
if rid == "" {
return ""
}
return prefix + strings.Replace(url.PathEscape(rid), ".", "/", -1)
}
func init() {
b, err := json.Marshal(reserr.ErrNotFound)
if err != nil {
panic(err)
}
RegisterAPIEncoderFactory("json", func(cfg Config) APIEncoder {
return &encoderJSON{apiPath: cfg.APIPath, notFoundBytes: b}
})
RegisterAPIEncoderFactory("jsonflat", func(cfg Config) APIEncoder {