mirror of
https://github.com/navidrome/navidrome.git
synced 2024-09-11 20:12:54 +02:00
18 lines
205 B
Go
18 lines
205 B
Go
package resources
|
|
|
|
import (
|
|
"embed"
|
|
"io"
|
|
)
|
|
|
|
//go:embed *
|
|
var FS embed.FS
|
|
|
|
func Asset(path string) ([]byte, error) {
|
|
f, err := FS.Open(path)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return io.ReadAll(f)
|
|
}
|