Debian Codegraph @

context.go

raw symbols SCIP
1 package yamlscip-go gomod github.com/goccy/go-yaml . `github.com/goccy/go-yaml`/
2
3 import "contextscip-go gomod github.com/golang/go/src go1.21.0 context/"
4
5 type (
6 ctxMergeKeyscip-go gomod github.com/goccy/go-yaml . `github.com/goccy/go-yaml`/ctxMergeKey# struct{}
7 ctxAnchorKeyscip-go gomod github.com/goccy/go-yaml . `github.com/goccy/go-yaml`/ctxAnchorKey# struct{}
8 )
9
10 func withMergescip-go gomod github.com/goccy/go-yaml . `github.com/goccy/go-yaml`/withMerge().(ctx contextscip-go gomod github.com/golang/go/src go1.21.0 context/.Contextscip-go gomod github.com/golang/go/src go1.21.0 context/Context#) contextscip-go gomod github.com/golang/go/src go1.21.0 context/.Contextscip-go gomod github.com/golang/go/src go1.21.0 context/Context# {
11 return contextscip-go gomod github.com/golang/go/src go1.21.0 context/.WithValuescip-go gomod github.com/golang/go/src go1.21.0 context/WithValue().(ctx, ctxMergeKeyscip-go gomod github.com/goccy/go-yaml . `github.com/goccy/go-yaml`/ctxMergeKey#{}, true)
12 }
13
14 func isMergescip-go gomod github.com/goccy/go-yaml . `github.com/goccy/go-yaml`/isMerge().(ctx contextscip-go gomod github.com/golang/go/src go1.21.0 context/.Contextscip-go gomod github.com/golang/go/src go1.21.0 context/Context#) bool {
15 v, ok := ctx.Valuescip-go gomod github.com/golang/go/src go1.21.0 context/Context#Value().(ctxMergeKeyscip-go gomod github.com/goccy/go-yaml . `github.com/goccy/go-yaml`/ctxMergeKey#{}).(bool)
16 if !ok {
17 return false
18 }
19 return v
20 }
21
22 func withAnchorscip-go gomod github.com/goccy/go-yaml . `github.com/goccy/go-yaml`/withAnchor().(ctx contextscip-go gomod github.com/golang/go/src go1.21.0 context/.Contextscip-go gomod github.com/golang/go/src go1.21.0 context/Context#, name string) contextscip-go gomod github.com/golang/go/src go1.21.0 context/.Contextscip-go gomod github.com/golang/go/src go1.21.0 context/Context# {
23 anchorMap := getAnchorMapscip-go gomod github.com/goccy/go-yaml . `github.com/goccy/go-yaml`/getAnchorMap().(ctx)
24 if anchorMap == nil {
25 anchorMap = make(map[string]struct{})
26 }
27 anchorMap[name] = struct{}{}
28 return contextscip-go gomod github.com/golang/go/src go1.21.0 context/.WithValuescip-go gomod github.com/golang/go/src go1.21.0 context/WithValue().(ctx, ctxAnchorKeyscip-go gomod github.com/goccy/go-yaml . `github.com/goccy/go-yaml`/ctxAnchorKey#{}, anchorMap)
29 }
30
31 func getAnchorMapscip-go gomod github.com/goccy/go-yaml . `github.com/goccy/go-yaml`/getAnchorMap().(ctx contextscip-go gomod github.com/golang/go/src go1.21.0 context/.Contextscip-go gomod github.com/golang/go/src go1.21.0 context/Context#) map[string]struct{} {
32 v, ok := ctx.Valuescip-go gomod github.com/golang/go/src go1.21.0 context/Context#Value().(ctxAnchorKeyscip-go gomod github.com/goccy/go-yaml . `github.com/goccy/go-yaml`/ctxAnchorKey#{}).(map[string]struct{})
33 if !ok {
34 return nil
35 }
36 return v
37 }