Not part of, but mentioned on golang/go#11424. Change-Id: I9d9289a67592aa43bcd55e073d8f3b29daa93056 Reviewed-on: https://go-review.googlesource.com/11735 Reviewed-by: Burcu Dogan <jbd@google.com>
26 lines
443 B
Go
26 lines
443 B
Go
// Copyright 2015 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
// +build darwin
|
|
// +build arm arm64
|
|
|
|
package asset
|
|
|
|
import (
|
|
"os"
|
|
"path/filepath"
|
|
)
|
|
|
|
func openAsset(name string) (File, error) {
|
|
if !filepath.IsAbs(name) {
|
|
name = filepath.Join("assets", name)
|
|
}
|
|
f, err := os.Open(name)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return f, nil
|
|
|
|
}
|