diff --git a/app/proxyman/command/command.go b/app/proxyman/command/command.go old mode 100644 new mode 100755 index ca0b662c4..e80f3d2c2 --- a/app/proxyman/command/command.go +++ b/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) } diff --git a/common/protocol/account.go b/common/protocol/account.go old mode 100644 new mode 100755 index 1c6a1eeaa..7793974a7 --- a/common/protocol/account.go +++ b/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 } diff --git a/common/protocol/context.go b/common/protocol/context.go old mode 100644 new mode 100755 index 6a2d24090..17437719a --- a/common/protocol/context.go +++ b/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 { diff --git a/proxy/proxy.go b/proxy/proxy.go old mode 100644 new mode 100755 index 0278d1185..a0d0ac422 --- a/proxy/proxy.go +++ b/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 }