Skip to content

Commit

Permalink
🎨 update useless anonym func
Browse files Browse the repository at this point in the history
  • Loading branch information
barbarbar338 authored Jun 24, 2021
1 parent 04d0e61 commit d29647f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions snowflake_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ type SnowflakeFactory struct {
}

func (s *SnowflakeFactory) Generate() Snowflake {
defer func() {
s.sequenceIncrease()
}()
defer s.sequenceIncrease()

s.mux.Lock()
now := time.Now().UnixNano() / 1000
Expand Down

0 comments on commit d29647f

Please sign in to comment.