| OLD | NEW |
| (Empty) |
| 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 // +build linux,!android darwin | |
| 6 | |
| 7 package app | |
| 8 | |
| 9 import ( | |
| 10 "os" | |
| 11 "path/filepath" | |
| 12 ) | |
| 13 | |
| 14 // Logic shared by desktop debugging implementations. | |
| 15 | |
| 16 func openAsset(name string) (ReadSeekCloser, 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 } | |
| OLD | NEW |