Skip to content

Commit 5d936e8

Browse files
committed
pam/adapter: Avoid using pointer receivers for Init functions
And other functions where we don't write to the models
1 parent 8f374de commit 5d936e8

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

pam/internal/adapter/authentication.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ func newAuthenticationModel(client authd.PAMClient, clientType PamClientType) au
174174
}
175175

176176
// Init initializes authenticationModel.
177-
func (m *authenticationModel) Init() tea.Cmd {
177+
func (m authenticationModel) Init() tea.Cmd {
178178
return nil
179179
}
180180

pam/internal/adapter/authmodeselection.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func newAuthModeSelectionModel(clientType PamClientType) authModeSelectionModel
5757
}
5858

5959
// Init initializes authModeSelectionModel.
60-
func (m *authModeSelectionModel) Init() tea.Cmd {
60+
func (m authModeSelectionModel) Init() tea.Cmd {
6161
if m.clientType != InteractiveTerminal {
6262
// This is handled by the GDM or Native model!
6363
return nil

pam/internal/adapter/userselection.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ func newUserSelectionModel(pamMTx pam.ModuleTransaction, clientType PamClientTyp
5858
}
5959

6060
// Init initializes userSelectionModel.
61-
func (m *userSelectionModel) Init() tea.Cmd {
61+
func (m userSelectionModel) Init() tea.Cmd {
6262
return nil
6363
}
6464

0 commit comments

Comments
 (0)