# Functions
Deduce attempts to deduce a RemediationError from a plain error.
FilterToken replaces any matched patterns with "REDACTED".
ServiceVersion returns an integer regardless of whether the given argument is a nil pointer or not.
SimplifyFastlyError reduces the potentially complex and multi-line Error rendering of a fastly.HTTPError to something more palatable for a CLI.
# Variables
AuthRemediation suggests checking the provided --token.
AutoCloneRemediation suggests provide an --autoclone flag.
BugRemediation suggests filing a bug on the GitHub repo.
CLIUpdateRemediation suggests updating the installed CLI version.
ComputeBuildRemediation suggests configuring a `[scripts.build]` setting in the fastly.toml manifest.
ComputeInitRemediation suggests re-running `compute init` to resolve manifest issue.
ComputeServeRemediation suggests re-running `compute serve` with one of the incompatible flags removed.
ComputeTrialRemediation suggests contacting customer manager to enable the free trial feature flag.
ConfigRemediation informs the user that an error with loading the config isn't a breaking error and the CLI can still be used.
CustomerIDRemediation suggests provide a customer ID via --customer-id flag or via environment variable.
ErrBuildStopped means the user stopped the build because they were unhappy with the custom build defined in the fastly.toml manifest file.
ErrIncompatibleManifestVersion means the manifest_version defined is no longer compatible with the current CLI version.
ErrIncompatibleServeFlags means no --skip-build can't be used with --watch because it defeats the purpose of --watch which is designed to restart Viceroy whenever changes are detected (those changes would not be seen if we allowed --skip-build with --watch).
ErrInvalidArchive means the package archive didn't contain a recognised directory structure.
ErrInvalidManifestVersion means the manifest_version is defined as a toml section.
ErrInvalidVerboseJSONCombo means the user provided both a --verbose and --json flag which are mutally exclusive behaviours.
ErrMissingManifestVersion means an invalid manifest (fastly.toml) has been used.
ErrNoCustomerID means no --customer-id or FASTLY_CUSTOMER_ID environment variable found.
ErrNoID means no --id value has been provided.
ErrNoServiceID means no --service-id or service_id package manifest value has been provided.
ErrNoToken means no --token has been provided.
ErrParsingManifest means there was a problem unmarshalling the package manifest.
ErrReadingManifest means there was a problem reading the package manifest.
ErrSignalInterrupt means a SIGINT was received.
ErrSignalKilled means a SIGTERM was received.
ErrStopWalk is used to indicate to filepath.WalkDir that it should stop walking the directory tree.
ErrUnrecognisedManifestVersion means an invalid manifest (fastly.toml) version has been specified.
ErrViceroyRestart means the viceroy binary needs to be restarted due to a file modification noticed while running `compute serve --watch`.
ExistingDirRemediation suggests moving to another directory and retrying.
5mb.
FormatTemplate represents a generic error message prefix.
HostRemediation suggests there might be an issue with the local host.
IDRemediation suggests an ID via --id flag should be provided.
InvalidStaticConfigRemediation indicates an unexpected error occurred when deserialising the CLI's internal configuration.
Log is the primary interface for consumers.
LogPath is the location of the fastly CLI error log.
NetworkRemediation suggests, somewhat unhelpfully, to try again later.
Now is exposed so that we may mock it from our test file.
PackageSizeRemediation suggests checking the resources documentation for the current package size limit.
ProfileRemediation suggests no profiles exist.
ServiceIDRemediation suggests provide a service ID via --service-id flag or package manifest.
TokenFlagRegEx matches the token flag (https://regex101.com/r/YNr78Q/1).
TokenRegEx matches a Token as part of the error output (https://regex101.com/r/ulIw1m/1).
# Structs
Caller represents where an error occurred.
LogEntry represents a single error log entry.
MockLog is a no-op Log type.
RemediationError wraps a normal error with a suggested remediation.
# Interfaces
LogInterface represents the LogEntries behaviours.
# Type aliases
LogEntries represents a list of recorded log entries.