Add null formatter

This commit is contained in:
Dan Jones 2024-03-11 21:18:52 -05:00
commit 632c7143f1
5 changed files with 83 additions and 2 deletions

View file

@ -67,7 +67,10 @@ var dropCmd = &cobra.Command{
if err != nil {
return err
}
fmt.Fprintf(cmd.OutOrStdout(), "%s\n", out)
if len(out) > 0 && out[len(out)-1] != 10 {
out = append(out, 10)
}
fmt.Fprintf(cmd.OutOrStdout(), "%s", out)
return nil
},