Replacer replaces templates with template values. As an optimization, it contains an internal cache to short circuit SQL that has entirely stable template replacements and whose output is invariant of input parameters. The struct is written so that it's safe to use as a value and doesn't need to be
| 89 | // be initialized with a constructor. This lets it default to a usable instance |
| 90 | // on drivers that may themselves not be initialized. |
| 91 | type Replacer struct { |
| 92 | cache map[replacerCacheKey]string |
| 93 | cacheMu sync.RWMutex |
| 94 | } |
| 95 | |
| 96 | var ( |
| 97 | templateBeginEndRE = regexp.MustCompile(`/\* TEMPLATE_BEGIN: (.*?) \*/ .*? /\* TEMPLATE_END \*/`) |
nothing calls this directly
no outgoing calls
no test coverage detected