Commit fba26e1
committed
feat(cli): enhance CLI flexibility and fix option precedence
- Exposed library configuration options (delimiter, case mode, strictness, etc.) as CLI flags in `cli/main.go`.
- Regenerated CLI command implementations using `gosubc` to support the new flags.
- Refactored `strings2` helper functions (`ToCamel`, `ToSnake`, etc.) in `permutations.go` and `types.go` to apply default options before user options, allowing users to override defaults.
- Updated `process` function in `cli/main.go` to pass parsed options to `strings2` functions as variadic arguments.
- Added a section to `README.md` about the CLI mode.
- Added a TODO to `README.md` to support slices for flags when `gosubc` supports it.1 parent f516b0d commit fba26e1
3 files changed
Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
95 | 99 | | |
96 | 100 | | |
97 | 101 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
84 | 93 | | |
85 | 94 | | |
86 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
0 commit comments