mirror of
https://github.com/vbatts/go-mtree.git
synced 2025-06-03 18:02:28 +00:00
keyword: unify keyword synonyms
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
627c6e9ddd
commit
5d26726bb1
6 changed files with 124 additions and 3 deletions
|
@ -396,7 +396,11 @@ func isTarSpec(spec *mtree.DirectoryHierarchy) bool {
|
|||
}
|
||||
|
||||
func splitKeywordsArg(str string) []string {
|
||||
return strings.Fields(strings.Replace(str, ",", " ", -1))
|
||||
keywords := []string{}
|
||||
for _, kw := range strings.Fields(strings.Replace(str, ",", " ", -1)) {
|
||||
keywords = append(keywords, mtree.KeywordSynonym(kw))
|
||||
}
|
||||
return keywords
|
||||
}
|
||||
|
||||
func inSlice(a string, list []string) bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue