Skip to content

Commit

Permalink
chore: fix help indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
dhth committed Mar 8, 2024
1 parent 07c4855 commit d390021
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 26 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ outtasync -profiles qa,prod

4. Press `?` to view keyboard shortcuts to use the TUI.

TODO
---

- [ ] Add a command to generate a sample config file
- [ ] Add CLI mode

Acknowledgements
---

Expand Down
49 changes: 24 additions & 25 deletions cmd/help.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,38 @@ import "fmt"

var (
configSampleFormat = `globalRefreshCommand: aws sso login --sso-session sessionname
profiles:
- name: qa
stacks:
- name: bingo-service-qa
local: ~/projects/bingo-service/cloudformation/infrastructure.yml
region: eu-central-1
refreshCommand: aws sso login --profile qa1
- name: papaya-service-qa
local: ~/projects/papaya-service/cloudformation/service.yml
region: eu-central-1
- name: racoon-service-qa
local: ~/projects/racoon-service/cloudformation/service.yml
region: eu-central-1
- name: prod
stacks:
- name: brb-dll-prod
local: ~/projects/brd-dll-service/cloudformation/service.yml
region: eu-central-1
refreshCommand: aws sso login --profile rgb-prod
- name: galactus-service-prod
local: ~/projects/galactus-service/cloudformation/service.yml
region: eu-central-1
`
profiles:
- name: qa
stacks:
- name: bingo-service-qa
local: ~/projects/bingo-service/cloudformation/infrastructure.yml
region: eu-central-1
refreshCommand: aws sso login --profile qa1
- name: papaya-service-qa
local: ~/projects/papaya-service/cloudformation/service.yml
region: eu-central-1
- name: racoon-service-qa
local: ~/projects/racoon-service/cloudformation/service.yml
region: eu-central-1
- name: prod
stacks:
- name: brb-dll-prod
local: ~/projects/brd-dll-service/cloudformation/service.yml
region: eu-central-1
refreshCommand: aws sso login --profile rgb-prod
- name: galactus-service-prod
local: ~/projects/galactus-service/cloudformation/service.yml
region: eu-central-1`
helpText = `Identify cloudformation stacks that have gone out of sync with the state represented by their stack files
Usage: outtasync [flags]
`
Usage: outtasync [flags]`
)

func cfgErrSuggestion(msg string) string {
return fmt.Sprintf(`%s
Make sure to structure the yml config file as follows:
%s
Use "outtasync -help" for more information`,
Expand Down
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func Execute() {
profiles := flag.String("profiles", "", "comma separated string of profiles to filter for")

flag.Usage = func() {
fmt.Fprintf(os.Stderr, "%s\nFlags:\n", helpText)
fmt.Fprintf(os.Stderr, "%s\n\nFlags:\n", helpText)
flag.PrintDefaults()
}

Expand Down

0 comments on commit d390021

Please sign in to comment.