17 lines
380 B
Go
17 lines
380 B
Go
// Copyright (c) 2026 Petr Balvín <opensource@petrbalvin.org> (https://petrbalvin.org)
|
|||
|
|
// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
|
||
|
|
|
||
|
|
package web
|
||
|
|
|
||
|
|
import (
|
||
|
|
"embed"
|
||
|
|
)
|
||
|
|
|
||
|
|
//go:embed static/*.svg
|
||
|
|
var staticFS embed.FS
|
||
|
|
|
||
|
|
// StaticFile returns a packaged static asset by file name.
|
||
|
|
func StaticFile(name string) ([]byte, error) {
|
||
|
|
return staticFS.ReadFile("static/" + name)
|
||
|
|
}
|