MCPcopy
hub / github.com/wavetermdev/waveterm / StrSetIntersection

Function StrSetIntersection

pkg/util/utilfn/utilfn.go:592–604  ·  view source on GitHub ↗
(s1 []string, s2 []string)

Source from the content-addressed store, hash-verified

590}
591
592func StrSetIntersection(s1 []string, s2 []string) []string {
593 set := make(map[string]bool)
594 for _, s := range s1 {
595 set[s] = true
596 }
597 var rtn []string
598 for _, s := range s2 {
599 if set[s] {
600 rtn = append(rtn, s)
601 }
602 }
603 return rtn
604}
605
606func QuickJson(v interface{}) string {
607 barr, _ := json.Marshal(v)

Callers 1

pruneUnusedJobsFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected