Merge remote-tracking branch 'clash/dev' into Alpha
# Conflicts: # .github/workflows/docker.yml # adapter/outboundgroup/fallback.go # adapter/outboundgroup/loadbalance.go # adapter/outboundgroup/relay.go # adapter/outboundgroup/selector.go # adapter/outboundgroup/urltest.go # config/config.go # go.mod # go.sum # main.go # test/go.mod # test/go.sum
This commit is contained in:
@ -36,7 +36,7 @@ func (m *TunnelMode) UnmarshalJSON(data []byte) error {
|
||||
}
|
||||
|
||||
// UnmarshalYAML unserialize Mode with yaml
|
||||
func (m *TunnelMode) UnmarshalYAML(unmarshal func(interface{}) error) error {
|
||||
func (m *TunnelMode) UnmarshalYAML(unmarshal func(any) error) error {
|
||||
var tp string
|
||||
unmarshal(&tp)
|
||||
mode, exist := ModeMapping[strings.ToLower(tp)]
|
||||
@ -53,7 +53,7 @@ func (m TunnelMode) MarshalJSON() ([]byte, error) {
|
||||
}
|
||||
|
||||
// MarshalYAML serialize TunnelMode with yaml
|
||||
func (m TunnelMode) MarshalYAML() (interface{}, error) {
|
||||
func (m TunnelMode) MarshalYAML() (any, error) {
|
||||
return m.String(), nil
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@ func (m *Manager) Now() (up int64, down int64) {
|
||||
|
||||
func (m *Manager) Snapshot() *Snapshot {
|
||||
connections := []tracker{}
|
||||
m.connections.Range(func(key, value interface{}) bool {
|
||||
m.connections.Range(func(key, value any) bool {
|
||||
connections = append(connections, value.(tracker))
|
||||
return true
|
||||
})
|
||||
|
Reference in New Issue
Block a user