1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-06 10:37:20 +00:00

Reduce some allocations in type conversion (#26772)

This commit is contained in:
Chongyi Zheng
2023-08-28 12:43:16 -04:00
committed by GitHub
parent 4803766f7a
commit ac2f8c9ac6
3 changed files with 4 additions and 4 deletions

View File

@ -232,7 +232,7 @@ func buildRepomd(pv *packages_model.PackageVersion, ownerID int64, data []*repoD
}
var buf bytes.Buffer
buf.Write([]byte(xml.Header))
buf.WriteString(xml.Header)
if err := xml.NewEncoder(&buf).Encode(&Repomd{
Xmlns: "http://linux.duke.edu/metadata/repo",
XmlnsRpm: "http://linux.duke.edu/metadata/rpm",