all: Run modernize -fix ./...

This commit is contained in:
Bjørn Erik Pedersen
2025-02-26 10:15:04 +01:00
parent b7ae24b9c2
commit 521911a576
141 changed files with 302 additions and 354 deletions

View File

@@ -39,12 +39,12 @@ func HugoGenerator(ft transform.FromTo) error {
}
head := "<head>"
replace := []byte(fmt.Sprintf("%s\n\t%s", head, hugoGeneratorTag))
replace := fmt.Appendf(nil, "%s\n\t%s", head, hugoGeneratorTag)
newcontent := bytes.Replace(b, []byte(head), replace, 1)
if len(newcontent) == len(b) {
head := "<HEAD>"
replace := []byte(fmt.Sprintf("%s\n\t%s", head, hugoGeneratorTag))
replace := fmt.Appendf(nil, "%s\n\t%s", head, hugoGeneratorTag)
newcontent = bytes.Replace(b, []byte(head), replace, 1)
}