Skip to content
This repository has been archived by the owner on Dec 30, 2024. It is now read-only.

Commit

Permalink
fix: deprecated message (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
azrod authored Aug 3, 2023
1 parent 1d8e747 commit 9750037
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions deprecated.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,25 +71,25 @@ func (d *Deprecated) computeDeprecatedDocumentation() string {
if d.TargetAttributeName == "" {
return ""
}
message += fmt.Sprintf("Rename the `%s` attribute to `%s` ", d.FromAttributeName, d.TargetAttributeName)
message += fmt.Sprintf("Rename the `%s` attribute to `%s`", d.FromAttributeName, d.TargetAttributeName)
case d.Removed:
message += fmt.Sprintf("Remove the `%s` attribute configuration ", d.FromAttributeName)
message += fmt.Sprintf("Remove the `%s` attribute configuration", d.FromAttributeName)

if d.TargetResourceName != "" {
if d.LinkToResourceDoc != "" {
message += fmt.Sprintf("as it replaced by the resource [`%s`](%s) ", d.TargetResourceName, d.LinkToResourceDoc)
message += fmt.Sprintf("as it replaced by the resource [`%s`](%s)", d.TargetResourceName, d.LinkToResourceDoc)
} else {
message += fmt.Sprintf("as it replaced by the resource `%s` ", d.TargetResourceName)
message += fmt.Sprintf("as it replaced by the resource `%s`", d.TargetResourceName)
}
}
default:
return ""
}

if d.LinkToMilestone != "" {
message += fmt.Sprintf(", it will be be removed in the version [`%s`](%s) of the provider", d.TargetRelease, d.LinkToMilestone)
message += fmt.Sprintf(", it will be removed in the version [`%s`](%s) of the provider", d.TargetRelease, d.LinkToMilestone)
} else {
message += fmt.Sprintf(", it will be be removed in the version `%s` of the provider", d.TargetRelease)
message += fmt.Sprintf(", it will be removed in the version `%s` of the provider", d.TargetRelease)
}

if d.LinkToIssue != "" {
Expand Down

0 comments on commit 9750037

Please sign in to comment.