feat: Refactor CLI config-ssh to improve UX (#1900)

- Magic block is replaced by Include statement
- Writes are only done on changes
- Inform user of changes via prompt
- Allow displaying changes via `--diff`
- Remove magic block if present
- Safer config writing via tmp-file + rename
- Parse previous `config-ssh` options, compare to new options and ask to use new (otherwise old ones are used)
- Tests the new functionality

Fixes #1326
This commit is contained in:
Mathias Fredriksson
2022-06-08 11:45:29 +03:00
committed by GitHub
parent 945fa9dacf
commit b65259f95e
5 changed files with 943 additions and 97 deletions
+1
View File
@@ -93,6 +93,7 @@ require (
github.com/pion/udp v0.1.1
github.com/pion/webrtc/v3 v3.1.41
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e
github.com/pkg/sftp v1.13.4
github.com/prometheus/client_golang v1.12.2
github.com/quasilyte/go-ruleguard/dsl v0.3.21