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

Commit

Permalink
feat: add Getters to the component Info struct
Browse files Browse the repository at this point in the history
Adding Getters allows us to pass the component.Info as an interface and
share it with other packages.

Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
  • Loading branch information
LucasRoesler committed Jan 9, 2022
1 parent 55be357 commit 1c83a04
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pkg/otel/component/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,15 @@ type Info struct {
Version string `json:"version"`
Commit string `json:"commit"`
}

func (i Info) GetName() string {
return i.Name
}

func (i Info) GetVersion() string {
return i.Version
}

func (i Info) GetCommit() string {
return i.Commit
}

0 comments on commit 1c83a04

Please sign in to comment.