integrate request builder into HTTP client for googleapis support (#159)
All checks were successful
coverage / build (push) Successful in 2m19s
test / test (push) Successful in 2m27s

This commit is contained in:
2025-10-03 10:39:44 +05:00
committed by GitHub
parent b2b24e0a9a
commit c757127453
38 changed files with 9820 additions and 1894 deletions

View File

@@ -0,0 +1,21 @@
package builder
import "sync"
var (
pathTemplateCache = make(map[string]*pathTemplate)
pathTemplateCacheMu sync.RWMutex
)
func getCachedPathTemplate(path string) (*pathTemplate, bool) {
pathTemplateCacheMu.RLock()
defer pathTemplateCacheMu.RUnlock()
tmpl, ok := pathTemplateCache[path]
return tmpl, ok
}
func setPathTemplateCache(path string, tmpl *pathTemplate) {
pathTemplateCacheMu.Lock()
defer pathTemplateCacheMu.Unlock()
pathTemplateCache[path] = tmpl
}