Skip to content

Commit

Permalink
feat: add resourcename.Wildcard
Browse files Browse the repository at this point in the history
Constant for the wildcard character.
  • Loading branch information
odsod committed May 6, 2021
1 parent 8e8179b commit 35a1b47
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion resourcename/segment.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func (s Segment) Literal() Literal {

// IsWildcard reports whether the segment is a wildcard.
func (s Segment) IsWildcard() bool {
return s == "-"
return s == Wildcard
}

// Literal is the literal part of a resource name segment.
Expand Down
4 changes: 4 additions & 0 deletions resourcename/wildcard.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package resourcename

// Wildcard is the resource name wildcard character "-".
const Wildcard = "-"

0 comments on commit 35a1b47

Please sign in to comment.