优化项目结构
This commit is contained in:
@@ -61,6 +61,10 @@ type Server struct {
|
||||
|
||||
// New 创建服务器
|
||||
func New(conf *Config) (*Server, error) {
|
||||
if conf == nil {
|
||||
conf = &Config{}
|
||||
}
|
||||
|
||||
if len(conf.AuthMethods) == 0 {
|
||||
return nil, ConfigError("认证方法不能为空")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user