mirror of
https://github.com/dolthub/dolt.git
synced 2026-01-16 10:26:05 -06:00
22 lines
367 B
Go
22 lines
367 B
Go
package gen
|
|
|
|
import (
|
|
"github.com/clipperhouse/typewriter"
|
|
)
|
|
|
|
func init() {
|
|
templates = append(templates, &typewriter.Template{
|
|
Name: "noms",
|
|
Text: `
|
|
func (self {{.Name}}) Equals(other Value) bool {
|
|
if other, ok := other.({{.Name}}); ok {
|
|
return self == other
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
`,
|
|
TypeConstraint: typewriter.Constraint{Comparable: true},
|
|
})
|
|
}
|