Rename TLS.Tls to TLS.Enable

Enable is more self-documenting.
This commit is contained in:
Eric Lippmann 2022-02-03 10:03:46 +01:00
parent c928b21dab
commit 59cf6ccc41

View file

@ -83,7 +83,7 @@ func ParseFlags() (*Flags, error) {
// TLS provides TLS configuration options for Redis and Database.
type TLS struct {
Tls bool `yaml:"tls"`
Enable bool `yaml:"tls"`
Cert string `yaml:"cert"`
Key string `yaml:"key"`
Ca string `yaml:"ca"`
@ -92,7 +92,7 @@ type TLS struct {
// MakeConfig assembles a tls.Config from t and address.
func (t *TLS) MakeConfig(address string) (*tls.Config, error) {
if !t.Tls {
if !t.Enable {
return nil, nil
}