code: func ValidateLogOpt(cfg map[string]string) error {
  	address, err := parseAddress(cfg["gelf-address"])
  	if err != nil {
  		return err
  	}
  
  	for key, val := range cfg {
  		switch key {
  		case "gelf-address":
  		case "tag":
  		case "labels":
  		case "labels-regex":
  		case "env":
  		case "env-regex":
  		case "gelf-compression-level":
  			if address.Scheme != "udp" {
  				return fmt.Errorf("compression is only supported on UDP")
  			}
  			i, err := strconv.Atoi(val)
  			if err != nil || i < flate.DefaultCompression || i > flate.BestCompression {
  				return fmt.Errorf("unknown value %q for log opt %q for gelf log driver", val, key)
  			}
  		case "gelf-compression-type":
  			if address.Scheme != "udp" {
  				return fmt.Errorf("compression is only supported on UDP")
  			}
  			switch val {
  			case "gzip", "zlib", "none":
  			default:
  				return fmt.Errorf("unknown value %q for log opt %q for gelf log driver", val, key)
  			}
  		case "gelf-tcp-max-reconnect", "gelf-tcp-reconnect-delay":
  			if address.Scheme != "tcp" {
  				return fmt.Errorf("%q is only valid for TCP", key)
  			}
  			i, err := strconv.Atoi(val)
  			if err != nil || i < 0 {
  				return fmt.Errorf("%q must be a positive integer", key)
  			}
  		default:
  			return fmt.Errorf("unknown log opt %q for gelf log driver", key)
  		}
  	}
  
  	return nil
  }
docs: // ValidateLogOpt looks for gelf specific log option gelf-address.