github.com/terramate-io/tf@v0.0.0-20230830114523-fce866b4dfcd/tfdiags/doc.go (about)

     1  // Copyright (c) HashiCorp, Inc.
     2  // SPDX-License-Identifier: MPL-2.0
     3  
     4  // Package tfdiags is a utility package for representing errors and
     5  // warnings in a manner that allows us to produce good messages for the
     6  // user.
     7  //
     8  // "diag" is short for "diagnostics", and is meant as a general word for
     9  // feedback to a user about potential or actual problems.
    10  //
    11  // A design goal for this package is for it to be able to provide rich
    12  // messaging where possible but to also be pragmatic about dealing with
    13  // generic errors produced by system components that _can't_ provide
    14  // such rich messaging. As a consequence, the main types in this package --
    15  // Diagnostics and Diagnostic -- are designed so that they can be "smuggled"
    16  // over an error channel and then be unpacked at the other end, so that
    17  // error diagnostics (at least) can transit through APIs that are not
    18  // aware of this package.
    19  package tfdiags