Skip to content

Commit

Permalink
refactor: keygen: refactor same expression (#16)
Browse files Browse the repository at this point in the history
This commit refactors same expression in keygen.go.

Signed-off-by: orangekame3 <[email protected]>
  • Loading branch information
orangekame3 authored Aug 15, 2024
1 parent 334fb4f commit 66abd54
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions keygen.go
Original file line number Diff line number Diff line change
Expand Up @@ -473,11 +473,8 @@ func (s *KeyPair) WriteKeys() error {
if memo := pubKeyMemo(); memo != "" {
ak = fmt.Sprintf("%s %s", ak, memo)
}
if err := writeKeyToFile([]byte(ak), s.publicKeyPath()); err != nil {
return err
}

return nil
return writeKeyToFile([]byte(ak), s.publicKeyPath())
}

// KeyPairExists checks if the SSH key pair exists on disk.
Expand Down

0 comments on commit 66abd54

Please sign in to comment.