mirror of
https://github.com/dolthub/dolt.git
synced 2026-01-25 18:49:36 -06:00
There are probably still a lot of variable names and comments to fix, but this updates all the Go code. Towards #441
34 lines
510 B
Go
34 lines
510 B
Go
package types
|
|
|
|
import "github.com/attic-labs/noms/ref"
|
|
|
|
type Enum struct {
|
|
v uint32
|
|
t Type
|
|
}
|
|
|
|
func newEnum(v uint32, t Type) Enum {
|
|
return Enum{v, t}
|
|
}
|
|
|
|
func (e Enum) Equals(other Value) bool {
|
|
return other != nil && e.t.Equals(other.Type()) && e.Ref() == other.Ref()
|
|
}
|
|
|
|
func (e Enum) Ref() ref.Ref {
|
|
throwaway := ref.Ref{}
|
|
return EnsureRef(&throwaway, e)
|
|
}
|
|
|
|
func (e Enum) Chunks() []ref.Ref {
|
|
return nil
|
|
}
|
|
|
|
func (e Enum) ChildValues() []Value {
|
|
return nil
|
|
}
|
|
|
|
func (e Enum) Type() Type {
|
|
return e.t
|
|
}
|