(path string)
| 100 | } |
| 101 | |
| 102 | func LoadPackageOther(path string) (*Package, error) { |
| 103 | if fileBytes, e := ReadFile(path); e != nil { |
| 104 | return getNew(path), e |
| 105 | } else { |
| 106 | result := getNew(path) |
| 107 | if err := json.Unmarshal(fileBytes, result); err != nil { |
| 108 | return nil, e |
| 109 | } |
| 110 | return result, nil |
| 111 | } |
| 112 | } |
no test coverage detected