github.com/SahandAslani/gomobile@v0.0.0-20210909130135-2cb2d44c09b2/asset/asset_darwin_armx.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 && (arm || arm64) 6 // +build darwin 7 // +build arm arm64 8 9 package asset 10 11 import ( 12 "os" 13 "path/filepath" 14 ) 15 16 func openAsset(name string) (File, error) { 17 if !filepath.IsAbs(name) { 18 name = filepath.Join("assets", name) 19 } 20 f, err := os.Open(name) 21 if err != nil { 22 return nil, err 23 } 24 return f, nil 25 }