3131 Long : `` ,
3232 Args : cobra .MinimumNArgs (1 ),
3333 Run : func (cmd * cobra.Command , args []string ) {
34- c := & tunnel.Config {
34+ c := & tunnel.Configuration {
3535 Host : "labstack.me:22" ,
3636 RemoteHost : "0.0.0.0" ,
3737 RemotePort : 80 ,
5252 SetResult (c ).
5353 SetError (e ).
5454 SetHeader ("User-Agent" , "labstack/tunnel" ).
55- Get (fmt .Sprintf ("https://api.labstack.com/tunnel/configs /%s" , name ))
55+ Get (fmt .Sprintf ("https://api.labstack.com/tunnel/configurations /%s" , name ))
5656 if err != nil {
5757 log .Fatalf ("failed to the find tunnel: %v" , err )
5858 } else if res .StatusCode () != http .StatusOK {
@@ -102,7 +102,7 @@ func Execute() {
102102func init () {
103103 cobra .OnInitialize (initConfig )
104104 rootCmd .PersistentFlags ().StringVarP (& configFile , "config" , "c" , "" , "config file (default is $HOME/tunnel/config.yaml)" )
105- rootCmd .PersistentFlags ().StringVarP (& name , "name" , "n" , "" , "config name from the dashboard" )
105+ rootCmd .PersistentFlags ().StringVarP (& name , "name" , "n" , "" , "configuration name from the dashboard" )
106106 rootCmd .PersistentFlags ().BoolVarP (& tcp , "tcp" , "" , false , "tcp tunnel" )
107107 rootCmd .PersistentFlags ().BoolVarP (& tls , "tls" , "" , false , "tls tunnel" )
108108}
@@ -119,8 +119,8 @@ func initConfig() {
119119 log .Fatalf ("failed to find the home directory: %v" , err )
120120 }
121121 root := filepath .Join (dir , ".tunnel" )
122- if err = os .MkdirAll (filepath .Join (root , "pid " ), 0755 ); err != nil {
123- log .Fatalf ("failed to create pid directory: %v" , err )
122+ if err = os .MkdirAll (filepath .Join (root , "run " ), 0755 ); err != nil {
123+ log .Fatalf ("failed to create run directory: %v" , err )
124124 }
125125 if err = os .MkdirAll (filepath .Join (root , "log" ), 0755 ); err != nil {
126126 log .Fatalf ("failed to create log directory: %v" , err )
0 commit comments