terraform-provider-gitea/vendor/github.com/hashicorp/terraform-plugin-sdk/internal/plans/action.go
Malar Invention 00ebcd295e add vendor
2022-04-03 09:37:16 +05:30

23 lines
597 B
Go

package plans
type Action rune
const (
NoOp Action = 0
Create Action = '+'
Read Action = '←'
Update Action = '~'
DeleteThenCreate Action = '∓'
CreateThenDelete Action = '±'
Delete Action = '-'
)
//go:generate go run golang.org/x/tools/cmd/stringer -type Action
// IsReplace returns true if the action is one of the two actions that
// represents replacing an existing object with a new object:
// DeleteThenCreate or CreateThenDelete.
func (a Action) IsReplace() bool {
return a == DeleteThenCreate || a == CreateThenDelete
}