mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 03:18:24 +00:00 
			
		
		
		
	Benefits: 1. smaller binary size (reduces more than 1MB) 2. better control of the assets details 3. fewer unmaintained dependencies 4. faster startup if the assets are not needed 5. won't hang up editors when open "bindata.go" by accident
		
			
				
	
	
		
			24 lines
		
	
	
		
			459 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			459 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| // Copyright 2020 The Gitea Authors. All rights reserved.
 | |
| // SPDX-License-Identifier: MIT
 | |
| 
 | |
| //go:build bindata
 | |
| 
 | |
| package public
 | |
| 
 | |
| //go:generate go run ../../build/generate-bindata.go ../../public bindata.dat
 | |
| 
 | |
| import (
 | |
| 	"sync"
 | |
| 
 | |
| 	_ "embed"
 | |
| 
 | |
| 	"code.gitea.io/gitea/modules/assetfs"
 | |
| )
 | |
| 
 | |
| //go:embed bindata.dat
 | |
| var bindata []byte
 | |
| 
 | |
| var BuiltinAssets = sync.OnceValue(func() *assetfs.Layer {
 | |
| 	return assetfs.Bindata("builtin(bindata)", assetfs.NewEmbeddedFS(bindata))
 | |
| })
 |