snow/storage/embeds.go

20 lines
246 B
Go
Raw Normal View History

2023-11-08 22:09:08 +00:00
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
}