mmetc
e34af358d7
refact cscli (globals) ( #2854 )
...
* cscli capi: avoid globals, extract methods
* cscli config restore: avoid global
* cscli hubtest: avoid global
* lint (whitespace, wrapped errors)
2024-02-23 10:37:04 +01:00
mmetc
3e3df5e4c6
refact "cscli config", remove flag "cscli restore --old-backup" ( #2832 )
...
* refact "cscli config show"
* refact "cscli config backup"
* refact "cscli confgi show-yaml"
* refact "cscli config restore"
* refact "cscli config feature-flags"
* cscli restore: remove 'old-backup' option
* lint (whitespace, wrapped errors)
2024-02-22 11:04:36 +01:00
mmetc
4e724f6c0a
refact "cscli" root cmd ( #2811 )
...
* refact "cscli" root cmd
* lint (naming, imports, whitespace)
2024-02-06 10:50:28 +01:00
mmetc
a504113186
lint (wsl) ( #2692 )
2024-01-03 10:55:41 +01:00
mmetc
6e34d609b7
cscli: silence cwhub logger for non-hub related commands ( #2675 )
2023-12-19 17:20:09 +01:00
mmetc
a5ab73d458
cscli machines add: don't overwrite existing credential file ( #2625 )
...
* cscli machines add: don't overwrite existing credential file
* keep old behavior with --force
Now --force is used both to override the replacement of and existing machine,
and an existing credentials file. To retain the old behavior, the
existence of the file is only checked for the default configuration, not
if explicitly specified.
2023-12-04 22:59:52 +01:00
mmetc
ffcab0b2bc
Refactor hub management and cscli commands ( #2545 )
2023-11-24 15:57:32 +01:00
Manuel Sabban
6e228f3f3f
pkg/cwhub: cleanup in argument call ( #2527 )
...
* cleanup in argument call
* update test as well
* cwhub_tests: reduce verbosity and use helpers
---------
Co-authored-by: Marco Mariani <marco@crowdsec.net>
2023-10-09 13:26:34 +02:00
mmetc
338141f067
Refact cscli hub / pkg/cwhub (part 5) ( #2521 )
...
* remove unused yaml tags
* cscli/cwhub: deduplicate, remove dead code
* log.Fatal -> fmt.Errorf
* deflate utils.go by moving functions to respective files
* indexOf() -> slices.Index()
* ItemStatus() + toEmoji() -> Item.status()
* Item.versionStatus()
* move getSHA256() to loader.go
2023-10-06 13:59:51 +02:00
mmetc
5618ba9f46
cscli: refactor hub commands ( #2500 )
2023-10-04 10:42:47 +02:00
mmetc
cba6de024f
cscli: restore config correctly if acquis.d already exists ( #2504 )
2023-10-02 13:31:04 +02:00
mmetc
fddf597040
errors.Wrap -> fmt.Errorf; clean up imports ( #2297 )
2023-06-22 15:01:34 +02:00
mmetc
25bb23d8b7
minor refactor to pkg/types, cscli machines ( #2270 )
...
* cleanup: separate ui and logic
* trim some code from pkg/types
2023-06-08 15:08:51 +02:00
mmetc
ef3a130d54
Cscli config refactoring ( #1934 )
2022-12-22 12:22:55 +01:00