Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Vladimir Barsukov
zGo
Commits
0702ebcc
Commit
0702ebcc
authored
Apr 26, 2024
by
Vladimir Barsukov
Browse files
fix
parent
15882c9d
Changes
1
Show whitespace changes
Inline
Side-by-side
zguid/zguid.go
View file @
0702ebcc
...
@@ -13,5 +13,5 @@ func New() string {
...
@@ -13,5 +13,5 @@ func New() string {
func
Hash
(
a
any
)
string
{
func
Hash
(
a
any
)
string
{
b
:=
md5
.
Sum
([]
byte
(
fmt
.
Sprintf
(
"%v"
,
a
)))
b
:=
md5
.
Sum
([]
byte
(
fmt
.
Sprintf
(
"%v"
,
a
)))
return
fmt
.
Sprintf
(
"%
x%x%x%x-%x%x-%x%x-%x%x-%x%x%x%x%x%
x"
,
b
[
0
],
b
[
1
],
b
[
2
],
b
[
3
],
b
[
4
],
b
[
5
],
b
[
6
],
b
[
7
],
b
[
8
],
b
[
9
],
b
[
10
],
b
[
11
],
b
[
12
],
b
[
13
],
b
[
14
],
b
[
15
])
return
fmt
.
Sprintf
(
"%
02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02
x"
,
b
[
0
],
b
[
1
],
b
[
2
],
b
[
3
],
b
[
4
],
b
[
5
],
b
[
6
],
b
[
7
],
b
[
8
],
b
[
9
],
b
[
10
],
b
[
11
],
b
[
12
],
b
[
13
],
b
[
14
],
b
[
15
])
}
}
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment