| 1 | // Copyright 2014 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 (linux && !android) || (darwin && !ios) || windows |
| 6 | |
| 7 | package assetscip-go gomod golang.org/x/mobile . `golang.org/x/mobile/asset`/ |
| 8 | |
| 9 | import ( |
| 10 | "osscip-go gomod github.com/golang/go/src go1.24.0 os/" |
| 11 | "path/filepathscip-go gomod github.com/golang/go/src go1.24.0 `path/filepath`/" |
| 12 | ) |
| 13 | |
| 14 | func openAssetscip-go gomod golang.org/x/mobile . `golang.org/x/mobile/asset`/openAsset().(name string) (Filescip-go gomod golang.org/x/mobile . `golang.org/x/mobile/asset`/File#, error) { |
| 15 | if !filepathscip-go gomod github.com/golang/go/src go1.24.0 `path/filepath`/.IsAbsscip-go gomod github.com/golang/go/src go1.24.0 `path/filepath`/IsAbs().(name) { |
| 16 | name = filepathscip-go gomod github.com/golang/go/src go1.24.0 `path/filepath`/.Joinscip-go gomod github.com/golang/go/src go1.24.0 `path/filepath`/Join().("assets", name) |
| 17 | } |
| 18 | f, err := osscip-go gomod github.com/golang/go/src go1.24.0 os/.Openscip-go gomod github.com/golang/go/src go1.24.0 os/Open().(name) |
| 19 | if err != nil { |
| 20 | return nil, err |
| 21 | } |
| 22 | return f, nil |
| 23 | } |