Skip to main content

type.go

type.go - Overview

  1. Overview Defines custom error types used within the errors package.

  2. Detailed Documentation

Variables

  • TypeInvalidInput:
    • Purpose: Represents an error type for invalid input.
    • Type: typ
    • Value: typ{"invalid-input"}
  • TypeInternal:
    • Purpose: Represents an internal error type.
    • Type: typ
    • Value: typ{"internal"}
  • TypeUnsupported:
    • Purpose: Represents an error type for unsupported operations.
    • Type: typ
    • Value: typ{"unsupported"}
  • TypeNotFound:
    • Purpose: Represents an error type for resources not found.
    • Type: typ
    • Value: typ{"not-found"}
  • TypeMethodNotAllowed:
    • Purpose: Represents an error type for disallowed methods.
    • Type: typ
    • Value: typ{"method-not-allowed"}
  • TypeAlreadyExists:
    • Purpose: Represents an error type for resources that already exist.
    • Type: typ
    • Value: typ{"already-exists"}
  • TypeUnauthenticated:
    • Purpose: Represents an error type for unauthenticated requests.
    • Type: typ
    • Value: typ{"unauthenticated"}
  • TypeForbidden:
    • Purpose: Represents an error type for forbidden requests.
    • Type: typ
    • Value: typ{"forbidden"}

type typ

  • Purpose: Defines a custom error type as a struct containing a string.
  • Fields:
    • s: string - The string representation of the error type.
  1. Code Examples None

  2. Clarity and Accuracy The documentation reflects the code accurately.

  3. Markdown & MDX Perfection The markdown is correctly formatted.

Include in Getting Started: NO