Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
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
5
type
Set
map
[string]
struct
{}
6
7
func
(s Set) Has(key string) bool {
8
_, ok := s[key]
9
return
ok
10
}
11
12
func
(s Set) Add(key string) {
13
s[key] =
struct
{}{}
Callers
1
main
Function · 0.80
Calls
no outgoing calls
Tested by
no test coverage detected