On 01/22/2017 12:52 PM, Amos Jeffries wrote: > - a config line should have roughly this generic structure: > 1) directive (first label, which determines the syntax) > 2) parameters (mandatory values, fixed positions for each one) > 3) options (values that may be absent, using key[=value] syntax). > 4) acl-list (if relevant)
Just for the record in case somebody tries to use the above as guidance for future work: Item (2) is too rigid IMO: Required parameters may be named. And if there is more than one or two required parameters, they _should_ be named. Named parameters/options should not require fixed positions, of course. The "absent values" remark in item (3) applies to all all key=value parameters, both optional and required -- a named parameter value may be optional even if the parameter itself is required. In summary, new directives should usually look like this: 1) directive name 2) unnamed fixed-position parameter or two; keep this list short! 3) named any-position parameters 4) acl-list; may contain actions Items 2, 3, and/or 4 may not be present/supported. Some parameters may be optional. Named parameters have name=value syntax. Parameter names use dashes (boo-bar), not underscores/camelCase/etc. (not foo_bar/fooBar/foobar). Some named key=value parameters may support optional values. I hope this is all common-sense and not be controversial! For directives that support ACLs, is the acl-list in (4) always optional (with either "all" or "allow all" as the default)? @Eduard, I believe the last version of your patch satisfies the above rules but please correct me if I am wrong. Thank you, Alex. _______________________________________________ squid-dev mailing list squid-dev@lists.squid-cache.org http://lists.squid-cache.org/listinfo/squid-dev