opentofu/internal/tfdiags/doc.go
Martin Atkins 05caff2ca3 Move tfdiags/ to internal/tfdiags/
This is part of a general effort to move all of Terraform's non-library
package surface under internal in order to reinforce that these are for
internal use within Terraform only.

If you were previously importing packages under this prefix into an
external codebase, you could pin to an earlier release tag as an interim
solution until you've make a plan to achieve the same functionality some
other way.
2021-05-17 14:09:07 -07:00

17 lines
835 B
Go

// Package tfdiags is a utility package for representing errors and
// warnings in a manner that allows us to produce good messages for the
// user.
//
// "diag" is short for "diagnostics", and is meant as a general word for
// feedback to a user about potential or actual problems.
//
// A design goal for this package is for it to be able to provide rich
// messaging where possible but to also be pragmatic about dealing with
// generic errors produced by system components that _can't_ provide
// such rich messaging. As a consequence, the main types in this package --
// Diagnostics and Diagnostic -- are designed so that they can be "smuggled"
// over an error channel and then be unpacked at the other end, so that
// error diagnostics (at least) can transit through APIs that are not
// aware of this package.
package tfdiags