1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-07-23 13:34:16 -04:00
OpenDiablo2/d2common/d2loader/asset/source.go
lord 77c358ed67
d2loader refactor (#722)
* d2loader refactor

- export sources
- asset and source both have a Path method
- make asset and source implement fmt.Stringer, which just calls Path method
- Loader.AddSource now returns the source and an error

* Update loader.go
2020-09-09 14:35:52 -04:00

15 lines
288 B
Go

package asset
import (
"fmt"
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2loader/asset/types"
)
// Source is an abstraction for something that can load and list assets
type Source interface {
fmt.Stringer
Type() types.SourceType
Open(name string) (Asset, error)
Path() string
}