Skip to content
This repository was archived by the owner on Jun 12, 2024. It is now read-only.

Commit 1c83a04

Browse files
committed
feat: add Getters to the component Info struct
Adding Getters allows us to pass the component.Info as an interface and share it with other packages. Signed-off-by: Lucas Roesler <[email protected]>
1 parent 55be357 commit 1c83a04

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

pkg/otel/component/info.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,15 @@ type Info struct {
66
Version string `json:"version"`
77
Commit string `json:"commit"`
88
}
9+
10+
func (i Info) GetName() string {
11+
return i.Name
12+
}
13+
14+
func (i Info) GetVersion() string {
15+
return i.Version
16+
}
17+
18+
func (i Info) GetCommit() string {
19+
return i.Commit
20+
}

0 commit comments

Comments
 (0)