Merge pull request #142 from Quasilyte/quasilyte/underef
simplify (*x).f to x.f where it does not change the semantics
This commit is contained in:
@ -172,7 +172,7 @@ func (s *HTTP) InitService() (err error) {
|
|||||||
s.InitLB()
|
s.InitLB()
|
||||||
}
|
}
|
||||||
if *s.cfg.DNSAddress != "" {
|
if *s.cfg.DNSAddress != "" {
|
||||||
(*s).domainResolver = dnsx.NewDomainResolver(*s.cfg.DNSAddress, *s.cfg.DNSTTL, s.log)
|
s.domainResolver = dnsx.NewDomainResolver(*s.cfg.DNSAddress, *s.cfg.DNSTTL, s.log)
|
||||||
}
|
}
|
||||||
if *s.cfg.ParentType == "ssh" {
|
if *s.cfg.ParentType == "ssh" {
|
||||||
err = s.ConnectSSH()
|
err = s.ConnectSSH()
|
||||||
|
|||||||
@ -145,7 +145,7 @@ func (s *SPS) CheckArgs() (err error) {
|
|||||||
func (s *SPS) InitService() (err error) {
|
func (s *SPS) InitService() (err error) {
|
||||||
|
|
||||||
if *s.cfg.DNSAddress != "" {
|
if *s.cfg.DNSAddress != "" {
|
||||||
(*s).domainResolver = dnsx.NewDomainResolver(*s.cfg.DNSAddress, *s.cfg.DNSTTL, s.log)
|
s.domainResolver = dnsx.NewDomainResolver(*s.cfg.DNSAddress, *s.cfg.DNSTTL, s.log)
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(*s.cfg.Parent) > 0 {
|
if len(*s.cfg.Parent) > 0 {
|
||||||
|
|||||||
@ -204,8 +204,8 @@ func (s *TCP) OutToUDP(inConn *net.Conn) (err error) {
|
|||||||
srcAddr := ""
|
srcAddr := ""
|
||||||
defer func() {
|
defer func() {
|
||||||
if item != nil {
|
if item != nil {
|
||||||
(*(*item).conn).Close()
|
(*item.conn).Close()
|
||||||
(*item).udpConn.Close()
|
item.udpConn.Close()
|
||||||
s.udpConns.Remove(srcAddr)
|
s.udpConns.Remove(srcAddr)
|
||||||
(*inConn).Close()
|
(*inConn).Close()
|
||||||
}
|
}
|
||||||
@ -248,8 +248,8 @@ func (s *TCP) OutToUDP(inConn *net.Conn) (err error) {
|
|||||||
} else {
|
} else {
|
||||||
item = v.(*UDPConnItem)
|
item = v.(*UDPConnItem)
|
||||||
}
|
}
|
||||||
(*item).touchtime = time.Now().Unix()
|
item.touchtime = time.Now().Unix()
|
||||||
go (*item).udpConn.Write(body)
|
go item.udpConn.Write(body)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
func (s *TCP) UDPRevecive(key string) {
|
func (s *TCP) UDPRevecive(key string) {
|
||||||
|
|||||||
Reference in New Issue
Block a user