defenseunicorns / uds-cli

GNU Affero General Public License v3.0
26 stars 11 forks source link

fix: cleanup color and typo #906

Closed catsby closed 2 months ago

catsby commented 2 months ago

Description

~Cleans up the positioning of "kind:" to be under Metadata, fixes the color output, and fixes a typo~. UPDATE: removes "kind:" entirely and fixes typo.

Unfortunately I couldn't merge this in with the existing b.bundle.Metadata struct. I tried a new inline struct that embedded the Metadata one but the yaml printer ended up making a new section for it, which isn't what I wanted.

New look:

Screenshot 2024-09-06 at 10 37 51 AM

Also unfortunately, ColorPrintYAML() forces an empty line before printing, so that's why there's a gap there.

While I was here, I renamed the imported zarf utils package to zarfUtils because I noticed uds-cli also has a utils package. While we don't use the uds-cli one here, while experimenting here with pterm I found that we did and there was confusion as to which I was trying to use... naming the import zarfUtils is consistent with what we do in pkg/bundle/create.go so I went with that.

Related Issue

Fixes #897

Type of change

Checklist before merging

UncleGedd commented 2 months ago

That newline! I don't love that either. What do you think of removing kind: UDSBundle from that output entirely? I think it's fairly self-evident with the BUNDLE DEFINITION header. In other words, IMO the kind: UDSBundle doesn't add much