snow/storage/embeds.go
2023-11-09 18:42:28 +00:00

20 lines
240 B
Go

package storage
import (
"embed"
"strings"
)
var (
//go:embed mem/*
Assets embed.FS
)
func Asset(file string) (*[]byte) {
data, err := Assets.ReadFile("mem/" + strings.ToLower(file))
if err != nil {
return nil
}
return &data
}