Remove byName in cmd/server/main.go, since urfave/cli#544 has been in.
Signed-off-by: Xianglin Gao <xlgao@zju.edu.cn>
This commit is contained in:
parent
c0e3c08a17
commit
088c53579a
17 changed files with 1594 additions and 818 deletions
|
@ -75,18 +75,6 @@ func mergeConfig(config *server.Config, ctx *cli.Context) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
type byName []cli.Flag
|
||||
|
||||
func (f byName) Len() int {
|
||||
return len(f)
|
||||
}
|
||||
func (f byName) Less(i, j int) bool {
|
||||
return f[i].GetName() < f[j].GetName()
|
||||
}
|
||||
func (f byName) Swap(i, j int) {
|
||||
f[i], f[j] = f[j], f[i]
|
||||
}
|
||||
|
||||
func main() {
|
||||
if reexec.Init() {
|
||||
return
|
||||
|
@ -173,9 +161,8 @@ func main() {
|
|||
},
|
||||
}
|
||||
|
||||
// remove once https://github.com/urfave/cli/pull/544 lands
|
||||
sort.Sort(byName(app.Flags))
|
||||
sort.Sort(byName(configCommand.Flags))
|
||||
sort.Sort(cli.FlagsByName(app.Flags))
|
||||
sort.Sort(cli.FlagsByName(configCommand.Flags))
|
||||
|
||||
app.Commands = []cli.Command{
|
||||
configCommand,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue