Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

all: Run Go 1.19 fmt #217

Merged
merged 2 commits into from Aug 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 3 additions & 4 deletions tfprotov5/internal/diag/diagnostics.go
Expand Up @@ -31,10 +31,9 @@ func (d Diagnostics) ErrorCount() int {

// Log will log every diagnostic:
//
// - Error severity at ERROR level
// - Warning severity at WARN level
// - Invalid/Unknown severity at WARN level
//
// - Error severity at ERROR level
// - Warning severity at WARN level
// - Invalid/Unknown severity at WARN level
func (d Diagnostics) Log(ctx context.Context) {
for _, diagnostic := range d {
if diagnostic == nil {
Expand Down
7 changes: 3 additions & 4 deletions tfprotov5/internal/tf5serverlogging/downstream_request.go
Expand Up @@ -21,10 +21,9 @@ func DownstreamRequest(ctx context.Context) context.Context {

// DownstreamResponse generates the following logging:
//
// - TRACE "Received downstream response" log with request duration and
// diagnostic severity counts
// - Per-diagnostic logs
//
// - TRACE "Received downstream response" log with request duration and
// diagnostic severity counts
// - Per-diagnostic logs
func DownstreamResponse(ctx context.Context, diagnostics diag.Diagnostics) {
responseFields := map[string]interface{}{
logging.KeyDiagnosticErrorCount: diagnostics.ErrorCount(),
Expand Down
7 changes: 3 additions & 4 deletions tfprotov6/internal/diag/diagnostics.go
Expand Up @@ -31,10 +31,9 @@ func (d Diagnostics) ErrorCount() int {

// Log will log every diagnostic:
//
// - Error severity at ERROR level
// - Warning severity at WARN level
// - Invalid/Unknown severity at WARN level
//
// - Error severity at ERROR level
// - Warning severity at WARN level
// - Invalid/Unknown severity at WARN level
func (d Diagnostics) Log(ctx context.Context) {
for _, diagnostic := range d {
if diagnostic == nil {
Expand Down
7 changes: 3 additions & 4 deletions tfprotov6/internal/tf6serverlogging/downstream_request.go
Expand Up @@ -21,10 +21,9 @@ func DownstreamRequest(ctx context.Context) context.Context {

// DownstreamResponse generates the following logging:
//
// - TRACE "Received downstream response" log with request duration and
// diagnostic severity counts
// - Per-diagnostic logs
//
// - TRACE "Received downstream response" log with request duration and
// diagnostic severity counts
// - Per-diagnostic logs
func DownstreamResponse(ctx context.Context, diagnostics diag.Diagnostics) {
responseFields := map[string]interface{}{
logging.KeyDiagnosticErrorCount: diagnostics.ErrorCount(),
Expand Down
18 changes: 7 additions & 11 deletions tftypes/value.go
Expand Up @@ -260,17 +260,13 @@ func (val Value) Copy() Value {
//
// The builtin Value representations are:
//
// * String: string, *string
//
// * Number: *big.Float, int64, *int64, int32, *int32, int16, *int16, int8,
// *int8, int, *int, uint64, *uint64, uint32, *uint32, uint16,
// *uint16, uint8, *uint8, uint, *uint, float64, *float64
//
// * Bool: bool, *bool
//
// * Map and Object: map[string]Value
//
// * Tuple, List, and Set: []Value
// - String: string, *string
// - Number: *big.Float, int64, *int64, int32, *int32, int16, *int16, int8,
// *int8, int, *int, uint64, *uint64, uint32, *uint32, uint16,
// *uint16, uint8, *uint8, uint, *uint, float64, *float64
// - Bool: bool, *bool
// - Map and Object: map[string]Value
// - Tuple, List, and Set: []Value
func NewValue(t Type, val interface{}) Value {
v, err := newValue(t, val)
if err != nil {
Expand Down