mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-19 15:02:10 +00:00
Use &struct{} instead of new
This commit is contained in:
1 parent
cc3f374623
commit
12ea3b8e28
7 files changed
+53
-50
No files matched your search
+4
-4
@@ -27,14 +27,14 @@ type SocksServer struct {
|
||||
}
|
||||
|
||||
func NewSocksServer(vp *core.Point, rawConfig []byte) *SocksServer {
|
||||
server := new(SocksServer)
|
||||
server.vPoint = vp
|
||||
config, err := loadConfig(rawConfig)
|
||||
if err != nil {
|
||||
panic(log.Error("Unable to load socks config: %v", err))
|
||||
}
|
||||
server.config = config
|
||||
return server
|
||||
return &SocksServer{
|
||||
vPoint: vp,
|
||||
config: config,
|
||||
}
|
||||
}
|
||||
|
||||
func (server *SocksServer) Listen(port uint16) error {
|
||||
|
||||
Reference in new issue
Block a user