mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	Add generic set type (#21408)
This PR adds a generic set type to get rid of maps used as sets. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
		@@ -60,7 +60,7 @@ func AssetIsDir(name string) (bool, error) {
 | 
			
		||||
// serveContent serve http content
 | 
			
		||||
func serveContent(w http.ResponseWriter, req *http.Request, fi os.FileInfo, modtime time.Time, content io.ReadSeeker) {
 | 
			
		||||
	encodings := parseAcceptEncoding(req.Header.Get("Accept-Encoding"))
 | 
			
		||||
	if encodings["gzip"] {
 | 
			
		||||
	if encodings.Contains("gzip") {
 | 
			
		||||
		if cf, ok := fi.(*vfsgen۰CompressedFileInfo); ok {
 | 
			
		||||
			rdGzip := bytes.NewReader(cf.GzipBytes())
 | 
			
		||||
			// all static files are managed by Gitea, so we can make sure every file has the correct ext name
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user