Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,063 changes: 0 additions & 2,063 deletions internal/command/format/diff.go

This file was deleted.

7,007 changes: 0 additions & 7,007 deletions internal/command/format/diff_test.go

This file was deleted.

29 changes: 0 additions & 29 deletions internal/command/format/difflanguage_string.go

This file was deleted.

27 changes: 27 additions & 0 deletions internal/command/format/format.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,30 @@
// output formatting as much as possible so that text formats of Terraform
// structures have a consistent look and feel.
package format

import "github.com/hashicorp/terraform/internal/plans"

// DiffActionSymbol returns a string that, once passed through a
// colorstring.Colorize, will produce a result that can be written
// to a terminal to produce a symbol made of three printable
// characters, possibly interspersed with VT100 color codes.
func DiffActionSymbol(action plans.Action) string {
switch action {
case plans.DeleteThenCreate:
return "[red]-[reset]/[green]+[reset]"
case plans.CreateThenDelete:
return "[green]+[reset]/[red]-[reset]"
case plans.Create:
return " [green]+[reset]"
case plans.Delete:
return " [red]-[reset]"
case plans.Read:
return " [cyan]<=[reset]"
case plans.Update:
return " [yellow]~[reset]"
case plans.NoOp:
return " "
default:
return " ?"
}
}
216 changes: 0 additions & 216 deletions internal/command/format/state.go

This file was deleted.

Loading