优化项目结构

This commit is contained in:
2025-02-27 18:07:00 +08:00
parent a541a7bd3a
commit 38d5341e84
9 changed files with 176 additions and 36 deletions

View File

@@ -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("认证方法不能为空")
}