mirror of
https://github.com/wagoodman/dive
synced 2026-03-14 22:35:50 +01:00
* refactor cli harness Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * use single configuration for ui Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * remove remaining viper rules * add basic CLI tests Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * separate cmd and api concerns for keybindings * plumb through context for future logging * port to using internal logger * internalize non-analysis path * encapsulate ui with clio * merge runtime into cmd + add adapter package * support legacy config shapes * improve testing around formatting * fix log-ui interactions * fix linting and update test snapshots * fix initialization of tree viewmodel * indent files in report * fix build * setup qemu and buildx in release workflow * show formatted output in CI * add cli tests for source flag * add default ci config cli test --------- Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
16 lines
259 B
Go
16 lines
259 B
Go
package utils
|
|
|
|
import (
|
|
"strings"
|
|
)
|
|
|
|
// CleanArgs trims the whitespace from the given set of strings.
|
|
func CleanArgs(s []string) []string {
|
|
var r []string
|
|
for _, str := range s {
|
|
if str != "" {
|
|
r = append(r, strings.Trim(str, " "))
|
|
}
|
|
}
|
|
return r
|
|
}
|