cli/pkg/cmdutil
Tyler McGoffin 0bb92c5980
Separate partitioning from globbing in cmdutil/args package and consumers (#3)
* Separate partitioning from globbing in cmdutil/args package and consumers

In the previous commit, GlobPaths was overloaded, containing logic
specific to command use-cases. This commit removes that functionality from
GlobPaths and back into the commands that have the special use-cases.

To do this, I've introduced a new Partition util in cmdutil/args.go that
will separate a slice into two slices given a predicate. This functionality
is leveraged by both the special use-cases described above to separate the
command-specific syntax from the globable filepaths.

* Add test to validate that the order of '-' in gh gist create args doesn't matter
2025-03-04 07:05:23 +05:00
..
args.go Separate partitioning from globbing in cmdutil/args package and consumers (#3) 2025-03-04 07:05:23 +05:00
args_test.go Separate partitioning from globbing in cmdutil/args package and consumers (#3) 2025-03-04 07:05:23 +05:00
auth_check.go Move config interfaces into gh package (#9060) 2024-05-10 10:39:36 +02:00
auth_check_test.go Move config interfaces into gh package (#9060) 2024-05-10 10:39:36 +02:00
cmdgroup.go Split issue commands into "General" vs. "Targeted" 2022-12-20 17:56:51 +01:00
errors.go chore: fix some function names in comment 2025-01-12 15:07:04 +08:00
factory.go Move config interfaces into gh package (#9060) 2024-05-10 10:39:36 +02:00
factory_test.go Fix determining executable location in PATH (#8238) 2023-11-14 08:26:19 +00:00
file_input.go Replace ioutil with io and os (#5498) 2022-04-26 13:07:44 +02:00
flags.go Autocomplete branch flags (#6031) 2023-03-29 16:09:44 +00:00
json_flags.go Bump golang ci lint to work with go 1.24 2025-01-21 17:55:39 +01:00
json_flags_test.go Add tests to verify proper help:json-fields annotations 2024-05-06 17:55:19 +01:00
legacy.go Fix repo fork to use remote protocol if none configured 2024-05-10 10:48:36 +02:00
repo_override.go Cleanup config.AuthToken and config.DefaultHost methods (#7049) 2023-02-28 00:24:45 +00:00