Name returns the Name (last element) of a module ID.
()
| 110 | |
| 111 | // Name returns the Name (last element) of a module ID. |
| 112 | func (id ModuleID) Name() string { |
| 113 | if id == "" { |
| 114 | return "" |
| 115 | } |
| 116 | parts := strings.Split(string(id), ".") |
| 117 | return parts[len(parts)-1] |
| 118 | } |
| 119 | |
| 120 | func (mi ModuleInfo) String() string { return string(mi.ID) } |
| 121 |