Improve code quality

This commit is contained in:
Neemek 2025-03-16 21:16:12 +01:00
parent 5edad332cd
commit 3f260e7ffd
Signed by: neemek
GPG key ID: 28360A8951CD0E9B
11 changed files with 95 additions and 45 deletions

View file

@ -154,7 +154,7 @@ func (v *BoolValue) Equals(other Value) bool {
return other.Type() == BoolValueType && other.(*BoolValue).bool == v.bool
}
func (v *BoolValue) Get(key string) (Value, error) {
func (v *BoolValue) Get(_ string) (Value, error) {
return nil, errors.New("booleans have no properties")
}
@ -254,7 +254,7 @@ func (v *NumberValue) Equals(other Value) bool {
return other.Type() == NumberValueType && other.(*NumberValue).float64 == v.float64
}
func (v *NumberValue) Get(key string) (Value, error) {
func (v *NumberValue) Get(_ string) (Value, error) {
// TODO maybe add standard functions for number values?
return nil, errors.New("numbers have no properties")
}
@ -489,7 +489,7 @@ type BuiltinFunctionValue struct {
Parent Value
}
func (v BuiltinFunctionValue) Type() ValueType {
func (v *BuiltinFunctionValue) Type() ValueType {
return BuiltinFunctionValueType
}