Преглед на файлове

fix typo, first sound of user is not a vowel, but the consonant /j/

wuxiangzhou2010 преди 7 години
родител
ревизия
a58063e7ac
променени са 4 файла, в които са добавени 6 реда и са изтрити 6 реда
  1. 2 2
      app/proxyman/command/command.go
  2. 1 1
      common/protocol/account.go
  3. 2 2
      common/protocol/context.go
  4. 1 1
      proxy/proxy.go

+ 2 - 2
app/proxyman/command/command.go

@@ -37,7 +37,7 @@ func (op *AddUserOperation) ApplyInbound(ctx context.Context, handler core.Inbou
 	}
 	um, ok := p.(proxy.UserManager)
 	if !ok {
-		return newError("proxy is not an UserManager")
+		return newError("proxy is not a UserManager")
 	}
 	return um.AddUser(ctx, op.User)
 }
@@ -50,7 +50,7 @@ func (op *RemoveUserOperation) ApplyInbound(ctx context.Context, handler core.In
 	}
 	um, ok := p.(proxy.UserManager)
 	if !ok {
-		return newError("proxy is not an UserManager")
+		return newError("proxy is not a UserManager")
 	}
 	return um.RemoveUser(ctx, op.Email)
 }

+ 1 - 1
common/protocol/account.go

@@ -1,6 +1,6 @@
 package protocol
 
-// Account is an user identity used for authentication.
+// Account is a user identity used for authentication.
 type Account interface {
 	Equals(Account) bool
 }

+ 2 - 2
common/protocol/context.go

@@ -10,12 +10,12 @@ const (
 	userKey key = iota
 )
 
-// ContextWithUser returns a context combined with an User.
+// ContextWithUser returns a context combined with a User.
 func ContextWithUser(ctx context.Context, user *User) context.Context {
 	return context.WithValue(ctx, userKey, user)
 }
 
-// UserFromContext extracts an User from the given context, if any.
+// UserFromContext extracts a User from the given context, if any.
 func UserFromContext(ctx context.Context) *User {
 	v := ctx.Value(userKey)
 	if v == nil {

+ 1 - 1
proxy/proxy.go

@@ -41,7 +41,7 @@ type UserManager interface {
 	// AddUser adds a new user.
 	AddUser(context.Context, *protocol.User) error
 
-	// RemoveUser removes an user by email.
+	// RemoveUser removes a user by email.
 	RemoveUser(context.Context, string) error
 }