mirror of
https://github.com/AynaLivePlayer/AynaLivePlayer.git
synced 2026-03-15 22:13:17 +08:00
21 lines
379 B
Go
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
|
|
}
|
|
}
|