asset: warn asset.Open must not be called from init.
Currently there is no easy way to fix golang/go#12077 so we document it. Fixes golang/go#12077 Change-Id: I6b37ae375673c055152dad5b93e180d9831aef76 Reviewed-on: https://go-review.googlesource.com/13430 Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
Родитель
ea3ef0580c
Коммит
9e2563f3e7
|
@ -23,6 +23,8 @@ import "io"
|
|||
// Open opens a named asset.
|
||||
//
|
||||
// Errors are of type *os.PathError.
|
||||
//
|
||||
// This must not be called from init when used in android apps.
|
||||
func Open(name string) (File, error) {
|
||||
return openAsset(name)
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче