mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-11 19:48:54 +01:00
ebitenutil: deprecate some APIs
This commit is contained in:
parent
c98501060f
commit
65654f0fc4
@ -28,6 +28,13 @@ func (f *file) Close() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// OpenFile opens a file and returns a stream for its data.
|
||||
//
|
||||
// The path parts should be separated with slash '/' on any environments.
|
||||
//
|
||||
// OpenFile doesn't work on mobiles.
|
||||
//
|
||||
// Deprecated: as of v2.4. Use os.Open on desktops and http.Get on browsers instead.
|
||||
func OpenFile(path string) (ReadSeekCloser, error) {
|
||||
res, err := http.Get(path)
|
||||
if err != nil {
|
||||
|
@ -26,7 +26,9 @@ import (
|
||||
//
|
||||
// The path parts should be separated with slash '/' on any environments.
|
||||
//
|
||||
// Note that this doesn't work on mobiles.
|
||||
// OpenFile doesn't work on mobiles.
|
||||
//
|
||||
// Deprecated: as of v2.4. Use os.Open on desktops and http.Get on browsers instead.
|
||||
func OpenFile(path string) (ReadSeekCloser, error) {
|
||||
return os.Open(filepath.FromSlash(path))
|
||||
}
|
||||
|
@ -19,6 +19,8 @@ import (
|
||||
)
|
||||
|
||||
// ReadSeekCloser is io.ReadSeeker and io.Closer.
|
||||
//
|
||||
// Deprecated: as of v2.4. Use io.ReadSeekCloser instead.
|
||||
type ReadSeekCloser interface {
|
||||
io.ReadSeeker
|
||||
io.Closer
|
||||
|
Loading…
Reference in New Issue
Block a user