Skip to content

Commit

Permalink
cli v2
Browse files Browse the repository at this point in the history
  • Loading branch information
matteriot committed Feb 14, 2020
1 parent 589bbdd commit 68f2e56
Show file tree
Hide file tree
Showing 49 changed files with 2,054 additions and 1,678 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ require (
github.com/templexxx/cpufeat v0.0.0-20180724012125-cef66df7f161 // indirect
github.com/templexxx/xor v0.0.0-20181023030647-4e92f724b73b // indirect
github.com/tjfoc/gmsm v1.0.1 // indirect
github.com/urfave/cli v1.22.2
github.com/urfave/cli/v2 v2.1.1
github.com/xtaci/kcp-go v5.4.11+incompatible
github.com/xtaci/lossyconn v0.0.0-20190602105132-8df528c0c9ae // indirect
gopkg.in/yaml.v2 v2.2.4
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ github.com/templexxx/xor v0.0.0-20181023030647-4e92f724b73b h1:mnG1fcsIB1d/3vbkB
github.com/templexxx/xor v0.0.0-20181023030647-4e92f724b73b/go.mod h1:5XA7W9S6mni3h5uvOC75dA3m9CCCaS83lltmc0ukdi4=
github.com/tjfoc/gmsm v1.0.1 h1:R11HlqhXkDospckjZEihx9SW/2VW0RgdwrykyWMFOQU=
github.com/tjfoc/gmsm v1.0.1/go.mod h1:XxO4hdhhrzAd+G4CjDqaOkd0hUzmtPR/d3EiBBMn/wc=
github.com/urfave/cli v1.22.2 h1:gsqYFH8bb9ekPA12kRo0hfjngWQjkJPlN9R0N78BoUo=
github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
github.com/urfave/cli/v2 v2.1.1 h1:Qt8FeAtxE/vfdrLmR3rxR6JRE0RoVmbXu8+6kZtYU4k=
github.com/urfave/cli/v2 v2.1.1/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ=
github.com/xtaci/kcp-go v5.4.11+incompatible h1:tJbtarpmOoOD74cZ41uvvF5Hyt1nvctHQCOxZ6ot5xw=
github.com/xtaci/kcp-go v5.4.11+incompatible/go.mod h1:bN6vIwHQbfHaHtFpEssmWsN45a+AZwO7eyRCmEIbtvE=
github.com/xtaci/lossyconn v0.0.0-20190602105132-8df528c0c9ae h1:J0GxkO96kL4WF+AIT3M4mfUVinOCPgf2uUWYFUzN0sM=
Expand Down
11 changes: 6 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"github.com/OpenIoTHub/server-go/config"
"github.com/OpenIoTHub/server-go/session"
"github.com/OpenIoTHub/server-go/udpapi"
"github.com/urfave/cli"
"github.com/urfave/cli/v2"
"os"
"time"
)
Expand All @@ -24,11 +24,12 @@ func main() {
myApp.Version = fmt.Sprintf("%s(commit:%s,build on:%s,buildBy:%s)", version, commit, date, builtBy)
myApp.Flags = []cli.Flag{
//TODO 应该设置工作目录,各组件共享
cli.StringFlag{
Name: "config,c",
&cli.StringFlag{
Name: "config",
Aliases: []string{"c"},
Value: config.ConfigFilePath,
Usage: "配置文件路径",
EnvVar: "ConfigFilePath",
Usage: "config file path",
EnvVars: []string{"ServerConfigFilePath"},
Destination: &config.ConfigFilePath,
},
}
Expand Down
35 changes: 0 additions & 35 deletions vendor/github.com/urfave/cli/.travis.yml

This file was deleted.

44 changes: 0 additions & 44 deletions vendor/github.com/urfave/cli/category.go

This file was deleted.

Loading

0 comments on commit 68f2e56

Please sign in to comment.