3 ms·
template, file, text
by drran 6y ago
template, file, text
- earthboundkid 6y agoIs file a file object? A file path? All three are “the template”. So, they use polish-ish notation: the template as []byte, template as string, and template as *template.Template.
- drran 6y agoIn just two hours we discovered so much! Let's keep digging.
- earthboundkid 6y agoI’m not sure I follow. Is two hours a long time or a short time? I use Go a lot, so I’m used to it’s conventions. b for bytes is obvious to me because I know ReadFile returns bytes (not a file handle or a buffer), but I can see why if you lack context, it can look odd. OTOH, I don’t use Rust, so when I read snippets with 'a lifetimes, they always look “wrong” to me.