func replaceWord()

in cli/pkg/config/config.go [475:485]


func replaceWord(word string, file string, tfRepo string) error {
	input, err := os.ReadFile(file)
	if err != nil {
		log.Fatalf("error reading file: %s", err)
	}
	output := bytes.Replace(input, []byte(word), []byte(tfRepo), -1)
	if err = os.WriteFile(file, output, 0666); err != nil {
		log.Fatalf("error writing file: %s", err)
	}
	return nil
}