Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: wrong spell in comment #357

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions env/envValues.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ func (e *Env) DefineGlobalValue(symbol string, value reflect.Value) error {

// set

// Set interface value to the scope where symbol is frist found.
// Set interface value to the scope where symbol is first found.
func (e *Env) Set(symbol string, value interface{}) error {
if value == nil {
return e.SetValue(symbol, NilValue)
}
return e.SetValue(symbol, reflect.ValueOf(value))
}

// SetValue reflect value to the scope where symbol is frist found.
// SetValue reflect value to the scope where symbol is first found.
func (e *Env) SetValue(symbol string, value reflect.Value) error {
e.rwMutex.RLock()
_, ok := e.values[symbol]
Expand All @@ -74,13 +74,13 @@ func (e *Env) SetValue(symbol string, value reflect.Value) error {

// get

// Get returns interface value from the scope where symbol is frist found.
// Get returns interface value from the scope where symbol is first found.
func (e *Env) Get(symbol string) (interface{}, error) {
rv, err := e.GetValue(symbol)
return rv.Interface(), err
}

// GetValue returns reflect value from the scope where symbol is frist found.
// GetValue returns reflect value from the scope where symbol is first found.
func (e *Env) GetValue(symbol string) (reflect.Value, error) {
e.rwMutex.RLock()
value, ok := e.values[symbol]
Expand Down