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
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
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
73d1ebe2
Commit
73d1ebe2
authored
10 years ago
by
Felix Lange
Browse files
Options
Downloads
Patches
Plain Diff
cmd/utils: add NewApp
parent
b4fa94c4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cmd/ethereum/main.go
+1
-5
1 addition, 5 deletions
cmd/ethereum/main.go
cmd/utils/flags.go
+11
-0
11 additions, 0 deletions
cmd/utils/flags.go
with
12 additions
and
5 deletions
cmd/ethereum/main.go
+
1
−
5
View file @
73d1ebe2
...
...
@@ -45,12 +45,10 @@ const (
var
(
clilogger
=
logger
.
NewLogger
(
"CLI"
)
app
=
cli
.
NewApp
()
app
=
utils
.
NewApp
(
Version
,
"the go-ethereum command line interface"
)
)
func
init
()
{
app
.
Version
=
Version
app
.
Usage
=
"the go-ethereum command-line client"
app
.
Action
=
run
app
.
HideVersion
=
true
// we have a command to print the version
app
.
Commands
=
[]
cli
.
Command
{
...
...
@@ -107,8 +105,6 @@ runtime will execute the file and exit.
Usage
:
`import a blockchain file`
,
},
}
app
.
Author
=
""
app
.
Email
=
""
app
.
Flags
=
[]
cli
.
Flag
{
utils
.
BootnodesFlag
,
utils
.
DataDirFlag
,
...
...
This diff is collapsed.
Click to expand it.
cmd/utils/flags.go
+
11
−
0
View file @
73d1ebe2
...
...
@@ -19,6 +19,17 @@ import (
"github.com/ethereum/go-ethereum/p2p/nat"
)
// NewApp creates an app with sane defaults.
func
NewApp
(
version
,
usage
string
)
*
cli
.
App
{
app
:=
cli
.
NewApp
()
app
.
Name
=
path
.
Base
(
os
.
Args
[
0
])
app
.
Author
=
""
app
.
Email
=
""
app
.
Version
=
version
app
.
Usage
=
usage
return
app
}
// These are all the command line flags we support.
// If you add to this list, please remember to include the
// flag in the appropriate command definition.
...
...
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