-
Notifications
You must be signed in to change notification settings - Fork 7k
Closed
cli/go-gh
#184Labels
enhancementa request to improve CLIa request to improve CLIgh-helprelating to the gh help commandrelating to the gh help commandhelp wantedContributions welcomeContributions welcome
Description
In a gh
extension (written in bash) I needed to implement a fuzzy matching on the content of a label. Specifically I needed to exclude issues which has a label with project:
prefix. However, I couldn't find any functions in https://github.com/cli/go-gh/blob/trunk/pkg/template/template.go or standard go templates to support startsWith
.
There are quite a few string related function in https://github.com/Masterminds/sprig including the function which would help in my case:
- contains
- hasPrefix
- hasSuffix
- regexMatch
If inclusion of sprig into go-gh is not an option, would it be possible to implement at least contains
in the pkg/template/template.go
?
Metadata
Metadata
Assignees
Labels
enhancementa request to improve CLIa request to improve CLIgh-helprelating to the gh help commandrelating to the gh help commandhelp wantedContributions welcomeContributions welcome