MCPcopy Create free account
hub / github.com/coder/guts / containsImportSpecifier

Function containsImportSpecifier

convert.go:277–284  ·  view source on GitHub ↗
(list []*bindings.ImportSpecifier, target *bindings.ImportSpecifier)

Source from the content-addressed store, hash-verified

275}
276
277func containsImportSpecifier(list []*bindings.ImportSpecifier, target *bindings.ImportSpecifier) bool {
278 for _, s := range list {
279 if s.Name == target.Name && s.Alias == target.Alias && s.IsTypeOnly == target.IsTypeOnly {
280 return true
281 }
282 }
283 return false
284}
285
286// sortImports stabilizes the emission order for the imports list and the
287// specifiers within each entry. Without this the output would depend on the

Callers 1

AppendImportMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…