diff --git a/service/site-service.go b/service/site-service.go index 25b1251..6fffde7 100644 --- a/service/site-service.go +++ b/service/site-service.go @@ -50,6 +50,15 @@ func siteAccess(uri *string) error { description, _ = s.Attr("content") } }) + + //保持公平,长度限制 + if len(title) > 20 { + title = title[:20] + } + if len(description) > 200 { + description = description[:200] + } + if title != "" { id := uint32(crc32.ChecksumIEEE([]byte(*uri))) r := strings.Split(*uri, ".")