소스 검색

remove unnecessary error

Darien Raymond 8 년 전
부모
커밋
f2e149e1d0
2개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 0 1
      common/protocol/user.go
  2. 1 1
      proxy/shadowsocks/server.go

+ 0 - 1
common/protocol/user.go

@@ -7,7 +7,6 @@ import (
 )
 
 var (
-	ErrUserMissing        = errors.New("User is not specified.")
 	ErrAccountMissing     = errors.New("Account is not specified.")
 	ErrNonMessageType     = errors.New("Not a protobuf message.")
 	ErrUnknownAccountType = errors.New("Unknown account type.")

+ 1 - 1
proxy/shadowsocks/server.go

@@ -32,7 +32,7 @@ func NewServer(ctx context.Context, config *ServerConfig) (*Server, error) {
 		return nil, errors.New("Shadowsocks|Server: No space in context.")
 	}
 	if config.GetUser() == nil {
-		return nil, protocol.ErrUserMissing
+		return nil, errors.New("Shadowsocks|Server: User is not specified.")
 	}
 
 	rawAccount, err := config.User.GetTypedAccount()