feat: embed web assets
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
This commit is contained in:
		
							
								
								
									
										14
									
								
								web/web.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								web/web.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,14 @@
 | 
				
			|||||||
 | 
					package web
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						"embed"
 | 
				
			||||||
 | 
						"io/fs"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					//go:embed static/* templates/* themes/*
 | 
				
			||||||
 | 
					var files embed.FS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// FS returns a filesystem with the default web assets.
 | 
				
			||||||
 | 
					func FS() fs.FS {
 | 
				
			||||||
 | 
						return files
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Reference in New Issue
	
	Block a user