let command handle defaults

This commit is contained in:
Daniel Schmidt 2026-02-16 13:42:38 +01:00
parent 6b83486498
commit 5a9c0196d9
No known key found for this signature in database
GPG key ID: 377C3A4D62FBBBE2
2 changed files with 2 additions and 6 deletions

View file

@ -44,9 +44,7 @@ type Taint struct {
// the best effort interpretation of the arguments.
func ParseTaint(args []string) (*Taint, tfdiags.Diagnostics) {
var diags tfdiags.Diagnostics
taint := &Taint{
StateLock: true,
}
taint := &Taint{}
cmdFlags := defaultFlagSet("taint")
cmdFlags.BoolVar(&taint.AllowMissing, "allow-missing", false, "allow missing")

View file

@ -44,9 +44,7 @@ type Untaint struct {
// the best effort interpretation of the arguments.
func ParseUntaint(args []string) (*Untaint, tfdiags.Diagnostics) {
var diags tfdiags.Diagnostics
untaint := &Untaint{
StateLock: true,
}
untaint := &Untaint{}
cmdFlags := defaultFlagSet("untaint")
cmdFlags.BoolVar(&untaint.AllowMissing, "allow-missing", false, "allow missing")