This website works better with JavaScript.
Home
Help
Sign In
hackerbots
/
server
Watch
1
Star
0
Fork
0
Code
Issues
2
Pull Requests
0
Activity
Browse Source
trim the hashes
I tried taking it down to 6, but it fails the tests consistently ...
master
Stephen McQuay
7 years ago
parent
f8fb523a76
commit
4e55fa8ebe
1 changed files
with
1 additions
and
1 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-1
id.go
+ 1
- 1
id.go
View File
@ -33,5 +33,5 @@ func (id *IdGenerator) Hash() string {
h
:=
md5
.
New
(
)
ns
:=
time
.
Now
(
)
.
UnixNano
(
)
+
<-
id
.
id
io
.
WriteString
(
h
,
fmt
.
Sprintf
(
"%d"
,
ns
)
)
return
fmt
.
Sprintf
(
"%x"
,
h
.
Sum
(
nil
)
)
return
fmt
.
Sprintf
(
"%x"
,
h
.
Sum
(
nil
)
)
[
:
8
]
}
Write
Preview
Loading…
Cancel
Save