Function
listJoin
(list []string, sep string, lastSep string)
Source from the content-addressed store, hash-verified
| 25171 | } |
| 25172 | |
| 25173 | func listJoin(list []string, sep string, lastSep string) string { |
| 25174 | switch len(list) { |
| 25175 | case 0: |
| 25176 | return "" |
| 25177 | case 1: |
| 25178 | return list[0] |
| 25179 | default: |
| 25180 | return strings.Join(list[:len(list)-1], sep) + " " + lastSep + " " + list[len(list)-1] |
| 25181 | } |
| 25182 | } |
| 25183 | |
| 25184 | func (p *parser) parseRuleRecursiveLeader(rule *rule) (any, bool) { |
| 25185 | result, ok := p.getMemoized(rule) |
Tested by
no test coverage detected