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