Skip to content

Commit

Permalink
fix: typo (#57)
Browse files Browse the repository at this point in the history
Signed-off-by: Charles-Edouard Brétéché <[email protected]>
  • Loading branch information
eddycharly authored Oct 12, 2023
1 parent 759fcbd commit c8ae370
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions pkg/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@ func Time() string {
if !ok {
return notFound
}
return tryeFindSetting(vcsTime, bi.Settings...)
return tryFindSetting(vcsTime, bi.Settings...)
}

func Hash() string {
bi, ok := debug.ReadBuildInfo()
if !ok {
return notFound
}
return tryeFindSetting(vcsRevision, bi.Settings...)
return tryFindSetting(vcsRevision, bi.Settings...)
}

func tryeFindSetting(key string, settings ...debug.BuildSetting) string {
func tryFindSetting(key string, settings ...debug.BuildSetting) string {
for _, setting := range settings {
if setting.Key == key {
return setting.Value
Expand Down
4 changes: 2 additions & 2 deletions pkg/version/version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func TestHash(t *testing.T) {
require.Equal(t, "---", Hash())
}

func Test_tryeFindSetting(t *testing.T) {
func Test_tryFindSetting(t *testing.T) {
tests := []struct {
name string
key string
Expand Down Expand Up @@ -53,7 +53,7 @@ func Test_tryeFindSetting(t *testing.T) {
}}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := tryeFindSetting(tt.key, tt.settings...); got != tt.want {
if got := tryFindSetting(tt.key, tt.settings...); got != tt.want {
t.Errorf("tryeFindSetting() = %v, want %v", got, tt.want)
}
})
Expand Down

0 comments on commit c8ae370

Please sign in to comment.