Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
chain33-pai
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
szh
chain33-pai
Commits
b4ff0fc3
Commit
b4ff0fc3
authored
Jul 28, 2020
by
szh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
del uuid:
parent
ea71ed5a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
cmd.go
pkg/cmd/cmd.go
+6
-6
No files found.
pkg/cmd/cmd.go
View file @
b4ff0fc3
...
@@ -2,7 +2,6 @@ package cmd
...
@@ -2,7 +2,6 @@ package cmd
import
(
import
(
"bytes"
"bytes"
"fmt"
"github.com/33cn/chain33/common/log"
"github.com/33cn/chain33/common/log"
"os/exec"
"os/exec"
"strings"
"strings"
...
@@ -35,20 +34,21 @@ func GetLocalUUID() string {
...
@@ -35,20 +34,21 @@ func GetLocalUUID() string {
cmd
.
Stderr
=
&
errbuf
cmd
.
Stderr
=
&
errbuf
err
:=
cmd
.
Start
()
err
:=
cmd
.
Start
()
if
err
!=
nil
{
if
err
!=
nil
{
fmt
.
Println
(
"Start
"
,
err
)
cmdLog
.
Error
(
"GetLocalUUID Start"
,
"err
"
,
err
)
}
}
err
=
cmd
.
Wait
()
err
=
cmd
.
Wait
()
if
err
!=
nil
{
if
err
!=
nil
{
fmt
.
Println
(
"Wait"
,
err
)
cmdLog
.
Error
(
"GetLocalUUID Wait"
,
err
,
err
)
}
}
fmt
.
Println
(
"err"
,
errbuf
.
String
())
fmt
.
Println
(
"uuid"
,
buf
.
String
())
if
buf
.
String
()
!=
""
{
if
buf
.
String
()
!=
""
{
lines
:=
strings
.
Split
(
buf
.
String
(),
"
\n
"
)
lines
:=
strings
.
Split
(
buf
.
String
(),
"
\n
"
)
if
len
(
lines
)
>
0
{
if
len
(
lines
)
>
0
{
for
_
,
l
:=
range
lines
{
for
_
,
l
:=
range
lines
{
if
strings
.
Contains
(
l
,
"UUID"
)
{
if
strings
.
Contains
(
l
,
"UUID"
)
{
return
strings
.
Trim
(
l
,
"
\t
"
)
ll
:=
strings
.
Split
(
strings
.
Trim
(
l
,
"
\t
"
),
":"
)
if
len
(
ll
)
==
2
{
return
strings
.
Trim
(
ll
[
1
],
" "
)
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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