AppendToList adds each value to the right-hand side of parameter name as a comma-separated list without quoting.
(name string, value ...string)
| 125 | // AppendToList adds each value to the right-hand side of parameter name |
| 126 | // as a comma-separated list without quoting. |
| 127 | func (ps *ParameterSet) AppendToList(name string, value ...string) { |
| 128 | result := ps.Value(name) |
| 129 | |
| 130 | if len(value) > 0 { |
| 131 | if len(result) > 0 { |
| 132 | result += "," + strings.Join(value, ",") |
| 133 | } else { |
| 134 | result = strings.Join(value, ",") |
| 135 | } |
| 136 | } |
| 137 | |
| 138 | ps.Add(name, result) |
| 139 | } |
| 140 | |
| 141 | // Get returns the value of parameter name and whether or not it was present in ps. |
| 142 | func (ps *ParameterSet) Get(name string) (string, bool) { |