3
0
corteza/server/pkg/jsenv/scope.go
2022-11-14 09:26:39 +01:00

18 lines
232 B
Go

package jsenv
type (
globalScope map[string]interface{}
)
func (gs globalScope) Set(k string, i interface{}) {
gs[k] = i
}
func (gs globalScope) Get(k string) interface{} {
if v, ok := gs[k]; ok {
return v
}
return nil
}