Skip to content

Commit

Permalink
Merge pull request #7 from odgeapi/stevesmoot-patch-5
Browse files Browse the repository at this point in the history
Update panicapi.go
  • Loading branch information
stevesmoot authored Oct 16, 2018
2 parents 7943a77 + 70be6a3 commit d294e8c
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions panicapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,28 @@ func Panics() []string {
return panics
}
}

func removeDupes(a []string, b []string) []string {
if len(b) == 0 {
return nil
}
if len(a) == 0 {
return b
}

c := make([]string, 0) //iefficient but who cares for this
for _, v := range b {
new := true
for _, av := range a {
if v == av {
new = false
break
}
}
if new {
c = append(c, v)
}
}
return c
}

0 comments on commit d294e8c

Please sign in to comment.