github.com/SahandAslani/gomobile@v0.0.0-20210909130135-2cb2d44c09b2/asset/asset.go (about)

     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  
     5  //go:build darwin || linux || windows
     6  // +build darwin linux windows
     7  
     8  package asset
     9  
    10  import "io"
    11  
    12  // Open opens a named asset.
    13  //
    14  // Errors are of type *os.PathError.
    15  //
    16  // This must not be called from init when used in android apps.
    17  func Open(name string) (File, error) {
    18  	return openAsset(name)
    19  }
    20  
    21  // File is an open asset.
    22  type File interface {
    23  	io.ReadSeeker
    24  	io.Closer
    25  }