Invalid config check
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package option
|
||||
|
||||
import "github.com/sagernet/sing/common"
|
||||
|
||||
type Options struct {
|
||||
Log *LogOption `json:"log"`
|
||||
Inbounds []Inbound `json:"inbounds,omitempty"`
|
||||
@@ -7,6 +9,13 @@ type Options struct {
|
||||
Route *RouteOptions `json:"route,omitempty"`
|
||||
}
|
||||
|
||||
func (o Options) Equals(other Options) bool {
|
||||
return common.ComparablePtrEquals(o.Log, other.Log) &&
|
||||
common.SliceEquals(o.Inbounds, other.Inbounds) &&
|
||||
common.ComparableSliceEquals(o.Outbounds, other.Outbounds) &&
|
||||
common.PtrEquals(o.Route, other.Route)
|
||||
}
|
||||
|
||||
type LogOption struct {
|
||||
Disabled bool `json:"disabled,omitempty"`
|
||||
Level string `json:"level,omitempty"`
|
||||
|
||||
Reference in New Issue
Block a user