Example #1
0
func Assign(s *scope.Scope, pattern string, value interface{}) {
	if env := s.FindScope(pattern); env != nil {
		env.Put(pattern, value)
	} else {
		panic(fmt.Sprintf("%s was not defined", pattern))
	}
}