godoes / snaker

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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/godoes/snaker
)

Register the snaker methods to qbs

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

About

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

License:MIT License


Languages

Language:Go 78.5%Language:Batchfile 21.5%