Skip to content

Commit aa4f6e9

Browse files
committed
pass sa name to error message
Signed-off-by: rashmi_kh <[email protected]>
1 parent 49549f2 commit aa4f6e9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

internal/authentication/tokengetter.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ type TokenGetter struct {
2121
}
2222

2323
type SANotFoundError struct {
24-
Msg string
24+
ServiceAccountName string
2525
}
2626

27-
func (e *SANotFoundError) Error(serviceAccountName string) string {
28-
return fmt.Sprintf(" Unable to authenticate with Kubernetes cluster using ServiceAccount \"%s\": ServiceAccount \"%s\" not found.", serviceAccountName, serviceAccountName)
27+
func (e *SANotFoundError) Error() string {
28+
return fmt.Sprintf(" Unable to authenticate with Kubernetes cluster using ServiceAccount \"%s\": ServiceAccount \"%s\" not found.", e.ServiceAccountName, e.ServiceAccountName)
2929
}
3030

3131
type TokenGetterOption func(*TokenGetter)

0 commit comments

Comments
 (0)