Browse Source

doc: fix the word usage whether

Mustafa Arici 8 năm trước cách đây
mục cha
commit
3c59a7469c
5 tập tin đã thay đổi với 7 bổ sung7 xóa
  1. 2 2
      cmd/ovpm/user.go
  2. 1 1
      const.go
  3. 1 1
      pki/pki_test.go
  4. 1 1
      supervisor/supervisor.go
  5. 2 2
      user.go

+ 2 - 2
cmd/ovpm/user.go

@@ -188,7 +188,7 @@ var userUpdateCommand = cli.Command{
 			os.Exit(1)
 		}
 
-		// Check wether if all flags are are empty.
+		// Check whether if all flags are are empty.
 		if !(password != "" || gw || nogw || static != "" || noStatic || admin || noAdmin) {
 			fmt.Println("nothing is updated!")
 			fmt.Println()
@@ -196,7 +196,7 @@ var userUpdateCommand = cli.Command{
 			os.Exit(1)
 		}
 
-		// Given that static is set, check wether it's IPv4.
+		// Given that static is set, check whether it's IPv4.
 		if static != "" && !govalidator.IsIPv4(static) {
 			fmt.Println("--static flag takes a valid ipv4 address")
 			fmt.Println()

+ 1 - 1
const.go

@@ -28,6 +28,6 @@ const (
 	_DefaultCRLPath      = varBasePath + "crl.pem"
 )
 
-// Testing is used to determine wether we are testing or running normally.
+// Testing is used to determine whether we are testing or running normally.
 // Set it to true when testing.
 var Testing = false

+ 1 - 1
pki/pki_test.go

@@ -185,7 +185,7 @@ func TestReadCertFromPEM(t *testing.T) {
 	}
 }
 
-// isPEMEncodedProperly takes an PEM encoded string s and the expected block type typ (e.g. "RSA PRIVATE KEY") and returns wether it can be decodable.
+// isPEMEncodedProperly takes an PEM encoded string s and the expected block type typ (e.g. "RSA PRIVATE KEY") and returns whether it can be decodable.
 func isPEMEncodedProperly(t *testing.T, s string, typ string) bool {
 	block, _ := pem.Decode([]byte(s))
 

+ 1 - 1
supervisor/supervisor.go

@@ -114,7 +114,7 @@ func NewProcess(executable string, dir string, args []string) (*Process, error)
 	return &p, nil
 }
 
-// isExist returns wether the given executable binary is found on the filesystem or not.
+// isExist returns whether the given executable binary is found on the filesystem or not.
 func isExist(executable string) bool {
 	if _, err := os.Stat(executable); !os.IsNotExist(err) {
 		return true

+ 2 - 2
user.go

@@ -56,7 +56,7 @@ func (u *DBUser) setPassword(password string) error {
 	return nil
 }
 
-// CheckPassword returns wether the given password is correct for the user.
+// CheckPassword returns whether the given password is correct for the user.
 func (u *DBUser) CheckPassword(password string) bool {
 	_, err := passlib.Verify(password, u.Hash)
 	if err != nil {
@@ -356,7 +356,7 @@ func (u *DBUser) GetIPNet() string {
 	return ipn.String()
 }
 
-// IsNoGW returns wether user is set to get the vpn server as their default gateway.
+// IsNoGW returns whether user is set to get the vpn server as their default gateway.
 func (u *DBUser) IsNoGW() bool {
 	return u.NoGW
 }