MCPcopy
hub / github.com/geektutu/high-performance-go / Has

Method Has

charpter-2/code/hpg-empty-struct/main_set.go:7–10  ·  view source on GitHub ↗
(key string)

Source from the content-addressed store, hash-verified

5type Set map[string]struct{}
6
7func (s Set) Has(key string) bool {
8 _, ok := s[key]
9 return ok
10}
11
12func (s Set) Add(key string) {
13 s[key] = struct{}{}

Callers 1

mainFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected