Skip to content

Commit c955896

Browse files
CopilotYoungMayor
andcommitted
Fix linting issues - remove redundant newlines and format code
Co-authored-by: YoungMayor <47315212+YoungMayor@users.noreply.github.com>
1 parent fe39cb0 commit c955896

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

internal/commands/clearvalues.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ This is a dangerous operation and requires PIN confirmation.`,
4141
// First warning
4242
fmt.Printf("\n⚠️ WARNING: This operation will CLEAR ALL VALUES from '%s'\n", inputFile)
4343
fmt.Println("⚠️ This action is IRREVERSIBLE and will remove all sensitive data!")
44-
fmt.Println("⚠️ Make sure you have a backup before proceeding.\n")
44+
fmt.Println("⚠️ Make sure you have a backup before proceeding.")
4545

4646
// First PIN confirmation
4747
confirmed, err := utils.ConfirmWithPin("To proceed with clearing all values, please confirm with PIN")
@@ -56,7 +56,7 @@ This is a dangerous operation and requires PIN confirmation.`,
5656

5757
// Second warning - final confirmation
5858
fmt.Printf("\n⚠️ FINAL WARNING: You are about to PERMANENTLY CLEAR all values in '%s'\n", inputFile)
59-
fmt.Println("⚠️ This is your LAST CHANCE to cancel this operation!\n")
59+
fmt.Println("⚠️ This is your LAST CHANCE to cancel this operation!")
6060

6161
// Second confirmation (yes/no)
6262
finalConfirm, err := utils.PromptForConfirmation("Are you ABSOLUTELY SURE you want to continue?")

internal/commands/convert.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,22 +197,22 @@ func NewFromCmd() *cobra.Command {
197197
// convertToYAMLWithBlankLines converts environment variables to YAML format with blank lines between different prefixes
198198
func convertToYAMLWithBlankLines(envVars []parser.EnvVar) string {
199199
var sb strings.Builder
200-
200+
201201
for i, envVar := range envVars {
202202
// Escape special characters in value if needed
203203
value := envVar.Value
204204
if strings.ContainsAny(value, ":#{}[],&*!|>'\"%@`") || strings.HasPrefix(value, " ") || strings.HasSuffix(value, " ") {
205205
// Quote the value if it contains special YAML characters
206206
value = fmt.Sprintf("\"%s\"", strings.ReplaceAll(value, "\"", "\\\""))
207207
}
208-
208+
209209
sb.WriteString(fmt.Sprintf("%s: %s\n", envVar.Key, value))
210-
210+
211211
// Add blank line if this variable is marked for a blank line after it
212212
if envVar.BlankAfter && i < len(envVars)-1 {
213213
sb.WriteString("\n")
214214
}
215215
}
216-
216+
217217
return sb.String()
218218
}

0 commit comments

Comments
 (0)