Skip to content

Commit c204c89

Browse files
authored
minor updates to typed-name (#1113)
Signed-off-by: Nir Rozenbaum <[email protected]>
1 parent fe34b90 commit c204c89

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

pkg/epp/plugins/typedname.go

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,19 @@ limitations under the License.
1616

1717
package plugins
1818

19-
// TypedName is a utility struct providing a type and a name
20-
// to plugins.
21-
// It implements the Plugin interface and can be embedded in
22-
// plugins across the code to reduce boilerplate.
19+
const (
20+
separator = "/"
21+
)
22+
23+
// TypedName is a utility struct providing a type and a name to plugins.
2324
type TypedName struct {
24-
// Type returns the type of the plugin.
25+
// Type returns the type of a plugin.
2526
Type string
26-
// Name returns the name of this plugin instance.
27+
// Name returns the name of a plugin instance.
2728
Name string
2829
}
2930

30-
const (
31-
Separator = "/"
32-
)
33-
34-
// String returns the type and name rendered as
35-
// "<type>/<name>".
31+
// String returns the type and name rendered as "<name>/<type>".
3632
func (tn *TypedName) String() string {
37-
return tn.Type + Separator + tn.Name
33+
return tn.Name + separator + tn.Type
3834
}

0 commit comments

Comments
 (0)