Skip to content

E0122: Can't infer a type argument ​

None, Err, Some and other generic values take their type from where they go: a typed variable, a return, a parameter. Here nothing gives it.

Wrong ​

vuka
x := Err(errors.New("not found"))
vuka
x := Err[User](errors.New("not found"))

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.