MCPcopy Create free account
hub / github.com/ImAyrix/fallparams / Unique

Function Unique

funcs/utils/utils.go:29–41  ·  view source on GitHub ↗
(strSlice []string)

Source from the content-addressed store, hash-verified

27)
28
29func Unique(strSlice []string) []string {
30 keys := make(map[string]bool)
31 var list []string
32 for _, entry := range strSlice {
33 if _, value := keys[entry]; !value {
34 keys[entry] = true
35 if entry != "" {
36 list = append(list, entry)
37 }
38 }
39 }
40 return list
41}
42
43func ShowBanner(version string, inputLength int, myOptions *opt.Options) {
44 if !myOptions.SilentMode {

Callers 3

StartFunction · 0.92
FinalMessageFunction · 0.85
GetInputFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected