MCPcopy Create free account
hub / github.com/aptly-dev/aptly / StrSliceHasItem

Function StrSliceHasItem

utils/list.go:58–65  ·  view source on GitHub ↗

StrSliceHasItem checks item for presence in slice

(s []string, item string)

Source from the content-addressed store, hash-verified

56
57// StrSliceHasItem checks item for presence in slice
58func StrSliceHasItem(s []string, item string) bool {
59 for _, v := range s {
60 if v == item {
61 return true
62 }
63 }
64 return false
65}
66
67// StrMapSortedKeys returns keys of map[string]string sorted
68func StrMapSortedKeys(m map[string]string) []string {

Callers 12

expandGroupsInternalMethod · 0.92
ByRemoteRepoSourceMethod · 0.92
ByLocalRepoSourceMethod · 0.92
BySnapshotSourceMethod · 0.92
NewPublishedRepoFunction · 0.92
RemoveMethod · 0.92
ArchitecturesMethod · 0.92
aptlyServeFunction · 0.92
aptlyPublishSwitchFunction · 0.92
TestStrSliceHasItemlMethod · 0.85

Calls

no outgoing calls

Tested by 1

TestStrSliceHasItemlMethod · 0.68