Return the package size information for a given package path, creating it if it doesn't exist yet.
(path string)
| 56 | // Return the package size information for a given package path, creating it if |
| 57 | // it doesn't exist yet. |
| 58 | func (ps *programSize) getPackage(path string) *packageSize { |
| 59 | if field, ok := ps.Packages[path]; ok { |
| 60 | return field |
| 61 | } |
| 62 | field := &packageSize{ |
| 63 | Program: ps, |
| 64 | Sub: map[string]*packageSize{}, |
| 65 | } |
| 66 | ps.Packages[path] = field |
| 67 | return field |
| 68 | } |
| 69 | |
| 70 | // packageSize contains the size of a package, calculated from the linked object |
| 71 | // file. |
no outgoing calls
no test coverage detected