mirror of
https://github.com/sbrow/envr.git
synced 2026-08-26 09:53:32 -04:00
perf: Added a pre-alloc opportunity.
This commit is contained in:
@@ -6,15 +6,13 @@
|
||||
|
||||
3. procedures should be ordered by use, main at the top, then in the order they are called from main.
|
||||
|
||||
4. Check for prealloc opportunities. i.e. `make([dynamic]string)` -> `make([dynamic]string, 5)`.
|
||||
4. Test all command branches.
|
||||
|
||||
5. Test all command branches.
|
||||
5. Generate md and man pages again.
|
||||
|
||||
6. Generate md and man pages again.
|
||||
6. Bash Shell completion
|
||||
|
||||
7. Bash Shell completion
|
||||
|
||||
8. Add tests for untested commands.
|
||||
7. Add tests for untested commands.
|
||||
|
||||
|
||||
## Double-check AI output
|
||||
|
||||
@@ -124,12 +124,7 @@ key somewhere, otherwise your data could be lost forever.`,
|
||||
flags = GLOBAL_FLAGS,
|
||||
args = {{name = "path", optional = true}},
|
||||
},
|
||||
{
|
||||
name = "version",
|
||||
usage = "envr version",
|
||||
short = "Show envr's version",
|
||||
flags = {.Help},
|
||||
},
|
||||
{name = "version", usage = "envr version", short = "Show envr's version", flags = {.Help}},
|
||||
{
|
||||
name = "edit-config",
|
||||
usage = "envr edit-config",
|
||||
@@ -160,7 +155,7 @@ parse_args :: proc(args: []string, out: io.Stream, err: io.Stream) -> (cmd: Comm
|
||||
}
|
||||
|
||||
cmd.name = args[1]
|
||||
cmd.args = make([dynamic]string)
|
||||
cmd.args = make([dynamic]string, 0, len(args[2:]))
|
||||
|
||||
overflow := parse_flags(&cmd.flags, args[2:])
|
||||
for arg in overflow {
|
||||
|
||||
Reference in New Issue
Block a user