mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-21 17:46:58 -05:00
fix lint errors
This commit is contained in:
parent
5b4eef5c7b
commit
67f5292f38
@ -16,6 +16,7 @@ type LoggerServer struct {
|
||||
V *core.Instance
|
||||
}
|
||||
|
||||
// RestartLogger implements LoggerService.
|
||||
func (s *LoggerServer) RestartLogger(ctx context.Context, request *RestartLoggerRequest) (*RestartLoggerResponse, error) {
|
||||
logger := s.V.GetFeature((*log.Instance)(nil))
|
||||
if logger == nil {
|
||||
|
@ -138,10 +138,10 @@ func (g *Instance) Close() error {
|
||||
|
||||
g.active = false
|
||||
|
||||
common.Close(g.accessLogger)
|
||||
common.Ignore(common.Close(g.accessLogger), "Recycling it anyway")
|
||||
g.accessLogger = nil
|
||||
|
||||
common.Close(g.errorLogger)
|
||||
common.Ignore(common.Close(g.errorLogger), "Recycling this too")
|
||||
g.errorLogger = nil
|
||||
|
||||
return nil
|
||||
|
@ -1,7 +0,0 @@
|
||||
package proxyman
|
||||
|
||||
import "v2ray.com/core/common/errors"
|
||||
|
||||
func newError(values ...interface{}) *errors.Error {
|
||||
return errors.New(values...).Path("App", "Proxyman")
|
||||
}
|
@ -1,8 +1,6 @@
|
||||
// Package proxyman defines applications for managing inbound and outbound proxies.
|
||||
package proxyman
|
||||
|
||||
//go:generate go run $GOPATH/src/v2ray.com/core/common/errors/errorgen/main.go -pkg proxyman -path App,Proxyman
|
||||
|
||||
import (
|
||||
"context"
|
||||
)
|
||||
|
@ -74,10 +74,12 @@ func (m *Manager) GetCounter(name string) core.StatCounter {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Start implements common.Runnable.
|
||||
func (m *Manager) Start() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Close implement common.Closable.
|
||||
func (m *Manager) Close() error {
|
||||
return nil
|
||||
}
|
||||
|
@ -63,6 +63,7 @@ func (v *Error) WithContext(ctx context.Context) *Error {
|
||||
return v
|
||||
}
|
||||
|
||||
// Context returns the context that associated with the Error.
|
||||
func (v *Error) Context() context.Context {
|
||||
if v.ctx != nil {
|
||||
return v.ctx
|
||||
|
@ -5,8 +5,6 @@ import (
|
||||
"os"
|
||||
)
|
||||
|
||||
//go:generate go run $GOPATH/src/v2ray.com/core/common/errors/errorgen/main.go -pkg confloader -path Main,ConfLoader
|
||||
|
||||
type configFileLoader func(string) (io.ReadCloser, error)
|
||||
|
||||
var (
|
||||
|
@ -1,7 +0,0 @@
|
||||
package confloader
|
||||
|
||||
import "v2ray.com/core/common/errors"
|
||||
|
||||
func newError(values ...interface{}) *errors.Error {
|
||||
return errors.New(values...).Path("Main", "ConfLoader")
|
||||
}
|
@ -29,6 +29,7 @@ type Handler struct {
|
||||
v *core.Instance
|
||||
}
|
||||
|
||||
// New creates a new VMess outbound handler.
|
||||
func New(ctx context.Context, config *Config) (*Handler, error) {
|
||||
serverList := protocol.NewServerList()
|
||||
for _, rec := range config.Receiver {
|
||||
|
@ -56,7 +56,7 @@ func NewTimedUserValidator(hasher protocol.IDHash) *TimedUserValidator {
|
||||
return nil
|
||||
},
|
||||
}
|
||||
tuv.task.Start()
|
||||
common.Must(tuv.task.Start())
|
||||
return tuv
|
||||
}
|
||||
|
||||
|
@ -10,8 +10,8 @@ import (
|
||||
// DTLS writes header as DTLS. See https://tools.ietf.org/html/rfc6347
|
||||
type DTLS struct {
|
||||
epoch uint16
|
||||
sequence uint32
|
||||
length uint16
|
||||
sequence uint32
|
||||
}
|
||||
|
||||
// Size implements PacketHeader.
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
"v2ray.com/core/common/signal"
|
||||
)
|
||||
|
||||
// Option for creating new Pipes.
|
||||
type Option func(*pipe)
|
||||
|
||||
func WithoutSizeLimit() Option {
|
||||
|
Loading…
Reference in New Issue
Block a user