INNER CODE UNIT · Go

Equal

expr-lang/expr · vm/runtime/helpers/main.go:150

func Equal(a, b interface{}) bool {
	switch x := a.(type) {
	{{ cases "==" }}
	{{ array_equal_cases }}
	case string:
		switch y := b.(type) {
		case string:
			return x == y
		}
	case time.Time:
		switch y := b.(type) {
		case time.Time:
			return x.Equal(y)
		}
	case time.Duration:
		switch y := b.(type) {
		case time.Duration:
			return x == y

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…