Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
primitives
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
xx network
primitives
Commits
4db59d0d
Commit
4db59d0d
authored
Mar 5, 2021
by
Jonah Husson
Browse files
Options
Downloads
Patches
Plain Diff
make globals const instead of var
parent
a474f1ca
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
id/ephemeral/id.go
+3
-3
3 additions, 3 deletions
id/ephemeral/id.go
with
3 additions
and
3 deletions
id/ephemeral/id.go
+
3
−
3
View file @
4db59d0d
...
...
@@ -11,9 +11,9 @@ import (
"time"
)
var
Period
=
int64
(
time
.
Hour
*
24
)
var
NumOffsets
int64
=
1
<<
16
var
NsPerOffset
=
Period
/
NumOffsets
const
Period
=
int64
(
time
.
Hour
*
24
)
const
NumOffsets
int64
=
1
<<
16
const
NsPerOffset
=
Period
/
NumOffsets
// Ephemeral ID type alias
type
Id
[
8
]
byte
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment