File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 11package v5
22
33import (
4- "io/ioutil "
4+ "os "
55 "strings"
66
77 "github.com/luscis/openlan/cmd/api"
@@ -12,7 +12,7 @@ func Before(c *cli.Context) error {
1212 token := c .String ("token" )
1313 if token == "" {
1414 tokenFile := api .AdminTokenFile
15- if data , err := ioutil .ReadFile (tokenFile ); err == nil {
15+ if data , err := os .ReadFile (tokenFile ); err == nil {
1616 token = strings .TrimSpace (string (data ))
1717 }
1818 _ = c .Set ("token" , token )
Original file line number Diff line number Diff line change @@ -78,8 +78,9 @@ func (o Output) List(c *cli.Context) error {
7878
7979func (o Output ) Commands () * cli.Command {
8080 return & cli.Command {
81- Name : "output" ,
82- Usage : "Output links" ,
81+ Name : "output" ,
82+ Usage : "Output links" ,
83+ Action : o .List ,
8384 Subcommands : []* cli.Command {
8485 {
8586 Name : "add" ,
@@ -88,7 +89,7 @@ func (o Output) Commands() *cli.Command {
8889 & cli.StringFlag {Name : "remote" , Required : true },
8990 & cli.StringFlag {Name : "fallback" },
9091 & cli.IntFlag {Name : "segment" },
91- & cli.StringFlag {Name : "protocol" },
92+ & cli.StringFlag {Name : "protocol" , Value : "vxlan" },
9293 & cli.StringFlag {Name : "dstport" },
9394 & cli.StringFlag {Name : "secret" },
9495 & cli.StringFlag {Name : "crypt" },
You can’t perform that action at this time.
0 commit comments