Skip to content

Commit

Permalink
Merge pull request dragonflyoss#841 from yeya24/cleanup-dfget-fields
Browse files Browse the repository at this point in the history
cleanup some unused dfget config fields
  • Loading branch information
starnop authored Aug 20, 2019
2 parents 0f5d8a7 + 11cf45f commit 46c5c8c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
2 changes: 0 additions & 2 deletions cmd/dfget/app/root_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,9 @@ func (suit *dfgetSuit) Test_initFlagsNoArguments() {
suit.Equal(cfg.TotalLimit, 0)
suit.Equal(cfg.Notbs, false)
suit.Equal(cfg.DFDaemon, false)
suit.Equal(cfg.Version, false)
suit.Equal(cfg.ShowBar, false)
suit.Equal(cfg.Console, false)
suit.Equal(cfg.Verbose, false)
suit.Equal(cfg.Help, false)
suit.Equal(cfg.URL, "")
}

Expand Down
6 changes: 0 additions & 6 deletions dfget/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,6 @@ type Config struct {
// Insecure indicates whether skip secure verify when supernode interact with the source.
Insecure bool `json:"insecure,omitempty"`

// Version show version.
Version bool `json:"version,omitempty"`

// ShowBar show progress bar, it's conflict with `--console`.
ShowBar bool `json:"showBar,omitempty"`

Expand All @@ -204,9 +201,6 @@ type Config struct {
// If set true, log level will be 'debug'.
Verbose bool `json:"verbose,omitempty"`

// Help show help information.
Help bool `json:"help,omitempty"`

// ClientQueueSize is the size of client queue
// which controls the number of pieces that can be processed simultaneously.
// It is only useful when the pattern not equals "source".
Expand Down
3 changes: 1 addition & 2 deletions dfget/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,8 @@ func (suite *ConfigSuite) TestConfig_String(c *check.C) {
c.Assert(strings.Contains(cfg.String(), expected), check.Equals, true)
cfg.LocalLimit = 20971520
cfg.Pattern = "p2p"
cfg.Version = true
expected = "\"url\":\"\",\"output\":\"\",\"localLimit\":20971520," +
"\"pattern\":\"p2p\",\"version\":true"
"\"pattern\":\"p2p\""
c.Assert(strings.Contains(cfg.String(), expected), check.Equals, true)
}

Expand Down

0 comments on commit 46c5c8c

Please sign in to comment.