MCPcopy Create free account
hub / github.com/XmirrorSecurity/OpenSCA-cli / trimSpace

Function trimSpace

opensca/sca/java/pom.go:272–285  ·  view source on GitHub ↗

trimSpace 清除空白字符

(p *PomDependency)

Source from the content-addressed store, hash-verified

270
271// trimSpace 清除空白字符
272func 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依赖
288func (dep PomDependency) Check() bool {

Callers 1

ReadPomFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected