mirror of
https://github.com/renorris/openfsd
synced 2026-04-20 01:45:43 +08:00
change newlines to be MS-DOS style
This commit is contained in:
@@ -37,7 +37,14 @@ func formatServerListTxt() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
serversList := fmt.Sprintf("OPENFSD:%s:Everywhere:OPENFSD:1:", domainName)
|
serversList := fmt.Sprintf("OPENFSD:%s:Everywhere:OPENFSD:1:", domainName)
|
||||||
return strings.Replace(serverlistTextFormat, "{SERVERS_LIST}", serversList, -1)
|
|
||||||
|
// Format with built server list
|
||||||
|
formatted := strings.Replace(serverlistTextFormat, "{SERVERS_LIST}", serversList, -1)
|
||||||
|
|
||||||
|
// Ensure all line feeds also have carriage returns
|
||||||
|
formatted = strings.Replace(formatted, "\n", "\r\n", -1)
|
||||||
|
|
||||||
|
return formatted
|
||||||
}
|
}
|
||||||
|
|
||||||
var formattedServerListTxtEtag string
|
var formattedServerListTxtEtag string
|
||||||
|
|||||||
@@ -37,7 +37,13 @@ func formatStatusTxt() string {
|
|||||||
openfsdAddress += servercontext.Config().DomainName
|
openfsdAddress += servercontext.Config().DomainName
|
||||||
}
|
}
|
||||||
|
|
||||||
return strings.Replace(statusFormat, "{OPENFSD_ADDRESS}", openfsdAddress, -1)
|
// Format string with {OPENFSD_ADDRESS}
|
||||||
|
formatted := strings.Replace(statusFormat, "{OPENFSD_ADDRESS}", openfsdAddress, -1)
|
||||||
|
|
||||||
|
// Ensure all line feeds also have carriage returns
|
||||||
|
formatted = strings.Replace(formatted, "\n", "\r\n", -1)
|
||||||
|
|
||||||
|
return formatted
|
||||||
}
|
}
|
||||||
|
|
||||||
var formattedStatusTxtEtag string
|
var formattedStatusTxtEtag string
|
||||||
|
|||||||
Reference in New Issue
Block a user