]> Cypherpunks.ru repositories - govpn.git/commitdiff
Trivial stylistical changes
authorSergey Matveev <stargrave@stargrave.org>
Thu, 8 Dec 2016 20:29:57 +0000 (23:29 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Thu, 8 Dec 2016 20:29:57 +0000 (23:29 +0300)
src/cypherpunks.ru/govpn/client/client.go

index cfeba815de38bf0585a974aa0ea4311c540b688d..8e796f77e4c4249a11d9c9edf888e68f83a23b03 100644 (file)
@@ -27,7 +27,8 @@ type Configuration struct {
        ProxyAddress        string
        ProxyAuthentication string
        RemoteAddress       string
        ProxyAddress        string
        ProxyAuthentication string
        RemoteAddress       string
-       UpPath, DownPath    string
+       UpPath              string
+       DownPath            string
        StatsAddress        string
        NoReconnect         bool
        MTU                 int
        StatsAddress        string
        NoReconnect         bool
        MTU                 int
@@ -62,7 +63,7 @@ type Client struct {
        termSignal    chan os.Signal
        config        Configuration
 
        termSignal    chan os.Signal
        config        Configuration
 
-       // Error receive any error of all routines
+       // Error channel receives any kind of routine errors
        Error chan error
 }
 
        Error chan error
 }
 
@@ -103,7 +104,7 @@ MainCycle:
                case <-c.termSignal:
                        govpn.BothPrintf(`[finish remote="%s"]`, c.config.RemoteAddress)
                        c.termination <- struct{}{}
                case <-c.termSignal:
                        govpn.BothPrintf(`[finish remote="%s"]`, c.config.RemoteAddress)
                        c.termination <- struct{}{}
-                       // send a non-error to let know everything went fine
+                       // empty value signals that everything is fine
                        c.Error <- nil
                        break MainCycle
                case <-c.timeouted:
                        c.Error <- nil
                        break MainCycle
                case <-c.timeouted:
@@ -118,7 +119,11 @@ MainCycle:
                close(c.rehandshaking)
                close(c.termination)
        }
                close(c.rehandshaking)
                close(c.termination)
        }
-       if _, err = govpn.ScriptCall(c.config.DownPath, c.config.InterfaceName, c.config.RemoteAddress); err != nil {
+       if _, err = govpn.ScriptCall(
+               c.config.DownPath,
+               c.config.InterfaceName,
+               c.config.RemoteAddress,
+       ); err != nil {
                c.Error <- err
        }
 }
                c.Error <- err
        }
 }