Files
AynaLivePlayer/resource/resource.go
2022-07-15 16:30:50 -07:00

21 lines
379 B
Go

package resource
import (
"AynaLivePlayer/config"
"io/ioutil"
)
var ProgramIcon = []byte{}
var EmptyImage = []byte{}
func init() {
loadResource(config.GetAssetPath("icon.jpg"), &ProgramIcon)
loadResource(config.GetAssetPath("empty.png"), &EmptyImage)
}
func loadResource(path string, res *[]byte) {
if file, err := ioutil.ReadFile(path); err == nil {
*res = file
}
}