Standard library / go/types
go/types.ArgumentError.Error()
Formats the underlying type-argument error. Expected stdout: 'bad\n'.
Formal Syntax & Structure
go syntaxgo
func (e *ArgumentError) Error() stringReturn Value
string
Formats the underlying type-argument error.
Working Example
Example Snippetgo
package main
import ( "errors" "fmt" "go/types")
func main() { fmt.Println((&types.ArgumentError{Index: 0, Err: errors.New("bad")}).Error()) }