trimSpace 清除空白字符
(p *PomDependency)
| 270 | |
| 271 | // trimSpace 清除空白字符 |
| 272 | func trimSpace(p *PomDependency) { |
| 273 | if p == nil { |
| 274 | return |
| 275 | } |
| 276 | trim := func(s string) string { |
| 277 | return reg.ReplaceAllString(s, "") |
| 278 | } |
| 279 | p.GroupId = trim(p.GroupId) |
| 280 | p.ArtifactId = trim(p.ArtifactId) |
| 281 | p.Version = trim(p.Version) |
| 282 | p.Scope = trim(p.Scope) |
| 283 | p.Classifier = trim(p.Classifier) |
| 284 | p.Type = trim(p.Type) |
| 285 | } |
| 286 | |
| 287 | // Check 检查是否是合法maven依赖 |
| 288 | func (dep PomDependency) Check() bool { |