mirror of
https://github.com/ginuerzh/gost.git
synced 2024-04-21 12:31:34 +00:00
修复 examples 中的参数错误 (#315)
* return if error does not nil * [fixed][examples] 修复 examples 中的参数错误
This commit is contained in:
@@ -44,7 +44,6 @@ func main() {
|
||||
},
|
||||
)
|
||||
|
||||
s := &gost.Server{}
|
||||
ln, err := gost.TCPListener(laddr)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
@@ -53,7 +52,8 @@ func main() {
|
||||
gost.ChainHandlerOption(chain),
|
||||
gost.TLSConfigHandlerOption(tlsConfig()),
|
||||
)
|
||||
log.Fatal(s.Serve(ln, h))
|
||||
s := &gost.Server{ln}
|
||||
log.Fatal(s.Serve(h))
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
Reference in New Issue
Block a user