good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bor
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
bor
Commits
6ccd75c1
Commit
6ccd75c1
authored
3 years ago
by
Manav Darji
Browse files
Options
Downloads
Patches
Plain Diff
replace Fatalf function with fmt.Errorf
parent
08f99311
No related branches found
Branches containing commit
Tags
v0.1.3
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
internal/cli/server/config.go
+2
-2
2 additions, 2 deletions
internal/cli/server/config.go
internal/cli/server/server.go
+0
-21
0 additions, 21 deletions
internal/cli/server/server.go
with
2 additions
and
23 deletions
internal/cli/server/config.go
+
2
−
2
View file @
6ccd75c1
...
...
@@ -687,11 +687,11 @@ func (c *Config) buildEth(stack *node.Node) (*ethconfig.Config, error) {
}
else
{
developer
,
err
=
ks
.
NewAccount
(
passphrase
)
if
err
!=
nil
{
Fatal
f
(
"
F
ailed to create developer account: %v"
,
err
)
return
nil
,
fmt
.
Error
f
(
"
f
ailed to create developer account: %v"
,
err
)
}
}
if
err
:=
ks
.
Unlock
(
developer
,
passphrase
);
err
!=
nil
{
Fatal
f
(
"
F
ailed to unlock developer account: %v"
,
err
)
return
nil
,
fmt
.
Error
f
(
"
f
ailed to unlock developer account: %v"
,
err
)
}
log
.
Info
(
"Using developer account"
,
"address"
,
developer
.
Address
)
...
...
This diff is collapsed.
Click to expand it.
internal/cli/server/server.go
+
0
−
21
View file @
6ccd75c1
...
...
@@ -7,7 +7,6 @@ import (
"net"
"net/http"
"os"
"runtime"
"strings"
"time"
...
...
@@ -285,23 +284,3 @@ func setupLogger(logLevel string) {
}
log
.
Root
()
.
SetHandler
(
glogger
)
}
// Fatalf formats a message to standard error and exits the program.
// The message is also printed to standard output if standard error
// is redirected to a different file.
func
Fatalf
(
format
string
,
args
...
interface
{})
{
w
:=
io
.
MultiWriter
(
os
.
Stdout
,
os
.
Stderr
)
if
runtime
.
GOOS
==
"windows"
{
// The SameFile check below doesn't work on Windows.
// stdout is unlikely to get redirected though, so just print there.
w
=
os
.
Stdout
}
else
{
outf
,
_
:=
os
.
Stdout
.
Stat
()
errf
,
_
:=
os
.
Stderr
.
Stat
()
if
outf
!=
nil
&&
errf
!=
nil
&&
os
.
SameFile
(
outf
,
errf
)
{
w
=
os
.
Stderr
}
}
fmt
.
Fprintf
(
w
,
"Fatal: "
+
format
+
"
\n
"
,
args
...
)
os
.
Exit
(
1
)
}
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