Skip to content

Replace strcase.ToSnake with a better alternative #159

@erezrokah

Description

@erezrokah

We use strcase.ToSnake to create tables and column names:

return strcase.ToSnake(name)

It fails in many cases which forces consumers to override columns:
https://github.com/cloudquery/cloudquery/pull/1903/files#diff-696d2ccebfefda5499a79ed759bdb24563eb1a510b7d320f8d61e37298de76deR55
https://github.com/cloudquery/cloudquery/blob/edb6e0ed01ccdb4c1b218b67d57c75c36e0815bd/plugins/source/azure/codegen/recipes/compute.go#L70

We should a library that handles those cases for us.

Maybe also do a sanity check by doing ToSnake then ToCamel and see that we get the field name

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions