1
0
mirror of https://github.com/ManyakRus/crud_generator.git synced 2024-12-23 12:44:13 +02:00
crud_generator/vendor/github.com/serenize/snaker/README.md
Nikitin Aleksandr a6ea64ee3e новый
2023-10-24 18:03:04 +03:00

740 B

snaker

Build Status GoDoc

This is a small utility to convert camel cased strings to snake case and back, except some defined words.

QBS Usage

To replace the original toSnake and back algorithms for https://github.com/coocood/qbs you can easily use snaker:

Import snaker

import (
  github.com/coocood/qbs
  github.com/serenize/snaker
)

Register the snaker methods to qbs

qbs.ColumnNameToFieldName = snaker.SnakeToCamel
qbs.FieldNameToColumnName = snaker.CamelToSnake