integrate request builder into HTTP client for googleapis support (#157)
Some checks failed
coverage / build (push) Successful in 2m19s
test / test (push) Failing after 17m15s

This commit is contained in:
2025-09-23 15:30:15 +05:00
committed by GitHub
parent b37fca95cf
commit 24801750a7
32 changed files with 9491 additions and 1736 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
}