telebit/assets/files/files.go

18 lines
230 B
Go
Raw Permalink Normal View History

2020-06-03 06:17:30 +00:00
package files
import (
"net/http"
"os"
)
func Open(pathstr string) (http.File, error) {
f, err := Assets.Open(pathstr)
if nil != err {
f, err = os.Open(pathstr)
if nil != err {
return nil, err
}
}
return f, nil
}