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 c2bea87 commit 282bc17
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions internal/session/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,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])
sessionManager.localSessionID = localSession
sessionManager.localSessionID = (model.SessionID)(randomBytes[:8])

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

0 comments on commit 282bc17

Please sign in to comment.