INNER CODE UNIT · Go

func

depado/goploader · server/conf/conf.go:92

func (c *Conf) Validate() map[string]string {
	errors := make(map[string]string)
	if c.NameServer == "" {
		errors["name_server"] = "This field is required."
	}
	if c.ServeHTTPS {
		if c.SSLCert == "" {
			errors["ssl_cert"] = "This field is required if you serve https."
		}
		if c.SSLPrivKey == "" {
			errors["ssl_private_key"] = "This field is required if you serve https."
		}
	}
	return errors
}

// FillDefaults fills the zero value fields in the UnparsedConf with default
// values

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…