fatih/gomodifytags

Add -transform lowercase

kokizzu opened this issue · 3 comments

background: I got some error while doing scanny.pgxscan.Select because the column is not there

without the struct tag db:"createdat" (actually it was CreatedAt on the struct) it shows error scanning all: scanning: scanning: doing scan: scanFn: scany: column: createdat

and gomodifytags only allow PascalCase or snake_case (only these two that most similar), where what i need is lowercase.

It should be pretty easy to create a patch for this: add a new lowercase option in theswitch here: https://github.com/fatih/gomodifytags/blob/main/main.go#L390, update the docs, add a few tests.

yup already forked and add 3 more

Why not send a PR? :-)