cmd.go: Use a Replacer instead of multiple calls to Replace.