DiagnosticsError codes
M0016 invalid operation
The operator or conversion is not defined for the operand types.
example $ marmot build . error[M0016]: invalid operation: m < n (operator < not defined on map) --> ./main.go:5:6 | 5 | _ = m < n // maps have no order | ^ error: build failed with 1 error for more about an error, run `marmot explain M0016`
The program that produced it
package main
func main() {
var m, n map[string]int
_ = m < n // maps have no order
}
The mistake and the fix
var m, n map[string]int
_ = m < n // maps have no order_ = len(m) < len(n) See also all error codes and marmot explain.