4 ms·
For user defined templates, using string.Template() is a good alternative because it does not do multi-level attribute lookups. The single mapping lookup is sa
by raymondh 10y ago
For user defined templates, using string.Template() is a good alternative because it does not do multi-level attribute lookups. The single mapping lookup is safer. Also, the syntax is simpler, making it more suitable for exposure to end users and making it less hackable.