Standard library / errors
errors.ErrUnsupported
Sentinel for operations not supported by an implementation; return an error wrapping it when appropriate and test with errors.Is. Do not use for arbitrary validation failures. Expected stdout: 'true\n'.
Formal Syntax & Structure
go syntaxgo
var ErrUnsupported errorWorking Example
Example Snippetgo
package main
import ( "errors" "fmt")
func main() { e := fmt.Errorf("resize: %w", errors.ErrUnsupported) fmt.Println(errors.Is(e, errors.ErrUnsupported))}