asset.go 536 B

12345678910111213141516171819202122232425
  1. // Copyright 2015 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. //go:build darwin || linux || windows
  5. // +build darwin linux windows
  6. package asset
  7. import "io"
  8. // Open opens a named asset.
  9. //
  10. // Errors are of type *os.PathError.
  11. //
  12. // This must not be called from init when used in android apps.
  13. func Open(name string) (File, error) {
  14. return openAsset(name)
  15. }
  16. // File is an open asset.
  17. type File interface {
  18. io.ReadSeeker
  19. io.Closer
  20. }