Skip to content

Commit

Permalink
assign directly
Browse files Browse the repository at this point in the history
  • Loading branch information
ainghazal committed Jan 10, 2024
1 parent e72aca0 commit 3c43788
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions internal/session/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,7 @@ func NewManager(logger model.Logger) (*Manager, error) {
return sessionManager, err
}

// in go 1.17, one could do:
//localSession := (*sessionID)(lsid)
//var localSession model.SessionID
//copy(localSession[:], randomBytes[:8])
localSession := (model.SessionID)(randomBytes[:8])
sessionManager.localSessionID = localSession
sessionManager.localSessionID = (model.SessionID)(randomBytes[:8])

localKey, err := NewKeySource()
if err != nil {
Expand Down

0 comments on commit 3c43788

Please sign in to comment.