(name string)
| 168 | } |
| 169 | |
| 170 | func argName(name string) string { |
| 171 | out := "" |
| 172 | for i, p := range strings.Split(name, "_") { |
| 173 | if i == 0 { |
| 174 | out += strings.ToLower(p) |
| 175 | } else if p == "id" { |
| 176 | out += "ID" |
| 177 | } else { |
| 178 | out += strings.Title(p) |
| 179 | } |
| 180 | } |
| 181 | return out |
| 182 | } |
| 183 | |
| 184 | func buildQueries(req *plugin.GenerateRequest, options *opts.Options, structs []Struct) ([]Query, error) { |
| 185 | qs := make([]Query, 0, len(req.Queries)) |