case_converter

command module
v0.0.0-...-e346c60 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2019 License: MIT Imports: 5 Imported by: 0

README

Case Converter

Haven't you always wanted to convert that pesky camelCase string to beautiful snake_case? You just found the perfect CLI solution for it!

Installation

go get github.com/gmadorell/case_converter

Usage

$ case_converter -f format_from -t format_to some_text

Examples:

$ case_converter --from camel --to snake someText
-> some_text
$ case_converter -f pascal -t kebab SomeText
-> some-text

Accepted cases:

  • snake (e.g. some_example_sentence)
  • camel (e.g. someExampleSentence)
  • pascal (e.g. SomeExampleSentence)
  • lower (e.g. some example sentence)
  • upper (e.g. SOME EXAMPLE SENTENCE)
  • title (e.g. Some Example Sentence)
  • sentence (e.g. Some example sentence)
  • flat (e.g. someexamplesentence) (not supported for -f flag)
  • kebab (e.g. some-example-sentence)
  • dot (e.g. some.example.sentence)

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL