Skip to content

Commit 335b721

Browse files
committed
Add String() method to PrefixType.
1 parent 158bdab commit 335b721

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

api/prefix_type.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,20 @@ const (
1414
None
1515
)
1616

17+
func (m PrefixType) String() string {
18+
switch m {
19+
case Smart:
20+
return "Smart"
21+
case NodeName:
22+
return "NodeName"
23+
case PodName:
24+
return "PodName"
25+
case None:
26+
return "None"
27+
}
28+
return "<invalid>"
29+
}
30+
1731
func (m PrefixType) MarshalJSON() ([]byte, error) {
1832
switch m {
1933
case Smart:

0 commit comments

Comments
 (0)