Standard library / reflect
reflect.ValueError
Error describing an inappropriate Value method for its kind. It may be raised as a panic. Expected stdout: 'true\n'.
Formal Syntax & Structure
go syntaxgo
type ValueError struct { Method string Kind Kind}Working Example
Example Snippetgo
package main
import ( "fmt" "reflect" "strings")
func main() { e := &reflect.ValueError{Method: "reflect.Value.Int", Kind: reflect.String} fmt.Println(strings.Contains(e.Error(), "string"))}