MCPcopy Create free account
hub / github.com/diillson/chatcli / mergeTechs

Function mergeTechs

cli/workspace/memory/projects.go:184–197  ·  view source on GitHub ↗
(existing, incoming []string)

Source from the content-addressed store, hash-verified

182}
183
184func mergeTechs(existing, incoming []string) []string {
185 set := make(map[string]bool)
186 for _, t := range existing {
187 set[strings.ToLower(t)] = true
188 }
189 result := append([]string{}, existing...)
190 for _, t := range incoming {
191 if !set[strings.ToLower(t)] {
192 result = append(result, t)
193 set[strings.ToLower(t)] = true
194 }
195 }
196 return result
197}
198
199func stringSliceEqual(a, b []string) bool {
200 if len(a) != len(b) {

Callers 1

UpsertMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected