Skip to content

E0113: match isn't exhaustive ​

A match must cover every value of its subject. The message names a value no case matches.

Wrong ​

vuka
func describe(r Result[int]) string {
	match r {
	case Ok(n):
		return fmt.Sprint(n)
	}
}
vuka
func describe(r Result[int]) string {
	match r {
	case Ok(n):
		return fmt.Sprint(n)
	case Err(err):
		return err.Error()
	}
}

Released under the MIT License. Vuka builds on Go and its tools, which are made by the Go Authors. Vuka is not affiliated with Google or the Go project. Go is a trademark of Google LLC.