update to generate same header text for both policy files

Signed-off-by: kim (grufwub) <grufwub@gmail.com>
master
kim (grufwub) 4 years ago
parent 9e91ad37f1
commit 32e8a47073

@ -50,13 +50,18 @@ func cachePolicyFiles(rootDir, description, admin, geoloc string) {
}
}
func generatePolicyHeader(filename string) string {
text := "# This is an automatically generated"+DOSLineEnd
text += "# server policy file: "+filename+DOSLineEnd
text += "#"+DOSLineEnd
text += "# Eat the rich ~GophorDev"+DOSLineEnd
return text
}
func generateCapsTxt(description, admin, geoloc string) []byte {
text := "CAPS"+DOSLineEnd
text += DOSLineEnd
text += "# This is an automatically generated"+DOSLineEnd
text += "# server policy file: caps.txt"+DOSLineEnd
text += "#"+DOSLineEnd
text += "# Eat the rich ~GophorDev"+DOSLineEnd
text += generatePolicyHeader(CapsTxtStr)
text += DOSLineEnd
text += "CapsVersion=1"+DOSLineEnd
text += "ExpireCapsAfter=1800"+DOSLineEnd
@ -79,10 +84,7 @@ func generateCapsTxt(description, admin, geoloc string) []byte {
}
func generateRobotsTxt() []byte {
text := "# This is an automatically generated"+DOSLineEnd
text += "# server policy file: robots.txt"+DOSLineEnd
text += "#"+DOSLineEnd
text += "# Eat the rich ~GophorDev"+DOSLineEnd
text := generatePolicyHeader(RobotsTxtStr)
text += DOSLineEnd
text += "Usage-agent: *"+DOSLineEnd
text += "Disallow: *"+DOSLineEnd

Loading…
Cancel
Save