snow/storage/embeds.go
2023-11-08 22:09:08 +00:00

20 lines
246 B
Go

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