func applyCLIOptions(c *cli.Context, opts *Options) {
	if c == nil || opts == nil { //Safe-gaurd
		return
	}

	if c.String("config") != "" {
		//config file was used, ignore the flags
		return
	}

	opts.Relay.Host = c.String("relay-host")
	opts.Relay.Port = c.Uint("relay-port")
	opts.Transit.Host = c.String("transit-host")
	opts.Transit.Port = c.Uint("transit-port")

	opts.Relay.DBFile = c.String("db")

	if c.Bool("no-list") {
		opts.Relay.AllowList = false
	}

	if c.String("advert-version") != "" {
		opts.Relay.AdvertisedVersion = c.String("advert-version")
	}

	if c.Uint("cleaning") > 0 {
		ci := c.Uint("cleaning")
		opts.Relay.CleaningInterval = ci
	}

	if c.Uint("channel-exp") > 0 {
		ce := c.Uint("channel-exp")
		opts.Relay.ChannelExpiration = ce
	}

	opts.Logging.Path = c.String("log")

	if str := c.String("log-level"); str != "" {
		opts.Logging.Level = str
	}
	
	opts.Logging.BlurTimes = c.Uint("log-blur")
}
//applyCLIOptions writes the options presented in the CLI arguments to
//the provided ServerOptions object, overriding anything there previously
applyCLIOptions writes the options presented in the CLI arguments to
the provided ServerOptions object, overriding anything there previously
// applyCLIOptions writes the options presented in the CLI arguments to // the provided ServerOptions object overriding anything there previously
func applyCLIOptions(c *cli.Context, opts *Options) {
	if c == nil || opts == nil { 
		return
	}
	if c.String("config") != "" {
		return
	}
	opts.Relay.Host = c.String("relay-host")
	opts.Relay.Port = c.Uint("relay-port")
	opts.Transit.Host = c.String("transit-host")
	opts.Transit.Port = c.Uint("transit-port")
	opts.Relay.DBFile = c.String("db")
	if c.Bool("no-list") {
		opts.Relay.AllowList = false
	}
	if c.String("advert-version") != "" {
		opts.Relay.AdvertisedVersion = c.String("advert-version")
	}
	if c.Uint("cleaning") > 0 {
		ci := c.Uint("cleaning")
		opts.Relay.CleaningInterval = ci
	}
	if c.Uint("channel-exp") > 0 {
		ce := c.Uint("channel-exp")
		opts.Relay.ChannelExpiration = ce
	}
	opts.Logging.Path = c.String("log")
	if str := c.String("log-level"); str != "" {
		opts.Logging.Level = str
	}
	opts.Logging.BlurTimes = c.Uint("log-blur")
}
func applyCLIOptions ( c * cli . Context , opts * Options ) { if c == nil || opts == nil { return } if c . String ( " " ) != " " { return } opts . Relay . Host = c . String ( " " ) opts . Relay . Port = c . Uint ( " " ) opts . Transit . Host = c . String ( " " ) opts . Transit . Port = c . Uint ( " " ) opts . Relay . DBFile = c . String ( " " ) if c . Bool ( " " ) { opts . Relay . AllowList = false } if c . String ( " " ) != " " { opts . Relay . AdvertisedVersion = c . String ( " " ) } if c . Uint ( " " ) > 0 { ci := c . Uint ( " " ) opts . Relay . CleaningInterval = ci } if c . Uint ( " " ) > 0 { ce := c . Uint ( " " ) opts . Relay . ChannelExpiration = ce } opts . Logging . Path = c . String ( " " ) if str := c . String ( " " ) ; str != " " { opts . Logging . Level = str } opts . Logging . BlurTimes = c . Uint ( " " ) }
applyCLIOptions writes the options presented in the CLI arguments to
the provided ServerOptions object, overriding anything there previously
applyCLIOptions writes the options presented in the CLI arguments to the provided ServerOptions object overriding anything there previously
//Safe-gaurd //config file was used, ignore the flags