MCPcopy Index your code
hub / github.com/bytebase/bytebase / dedupStrings

Function dedupStrings

backend/plugin/parser/pg/query_span_loader.go:403–416  ·  view source on GitHub ↗
(in []string)

Source from the content-addressed store, hash-verified

401}
402
403func dedupStrings(in []string) []string {
404 if len(in) < 2 {
405 return in
406 }
407 seen := make(map[string]bool, len(in))
408 out := in[:0]
409 for _, s := range in {
410 if !seen[s] {
411 seen[s] = true
412 out = append(out, s)
413 }
414 }
415 return out
416}
417
418// tarjanSCC runs Tarjan's strongly-connected-components algorithm on the
419// dependency graph and returns SCCs. Each SCC's members are returned in the

Callers 1

buildDependencyEdgesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected