cli/pkg/cmd/gist/create
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
..
create.go Separate partitioning from globbing in cmdutil/args package and consumers (#3) 2025-03-04 07:05:23 +05:00
create_test.go Separate partitioning from globbing in cmdutil/args package and consumers (#3) 2025-03-04 07:05:23 +05:00