Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/raviqqe/rnm
Yet another codemod alternative
https://github.com/raviqqe/rnm
Last synced: about 13 hours ago
JSON representation
Yet another codemod alternative
- Host: GitHub
- URL: https://github.com/raviqqe/rnm
- Owner: raviqqe
- License: mit
- Created: 2020-10-07T01:55:00.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-10-22T21:24:10.000Z (17 days ago)
- Last Synced: 2024-11-01T12:42:13.900Z (8 days ago)
- Language: Go
- Homepage:
- Size: 245 KB
- Stars: 20
- Watchers: 3
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- go-awesome - rnm - code refactoring help (Open source library / Development Aid Package)
README
# rnm
[![GitHub Action](https://img.shields.io/github/actions/workflow/status/raviqqe/rnm/test.yaml?branch=main&style=flat-square)](https://github.com/raviqqe/rnm/actions)
[![Codecov](https://img.shields.io/codecov/c/github/raviqqe/rnm.svg?style=flat-square)](https://codecov.io/gh/raviqqe/rnm)
[![License](https://img.shields.io/github/license/raviqqe/rnm.svg?style=flat-square)](LICENSE)Yet another [`fastmod`](https://github.com/facebookincubator/fastmod) alternative.
Replace all occurrences of a name to another name in your code!
## Features
- Support for different case styles
- See `rnm --help` to list them all.
- Automatic pluralization
- File renaming
- Massive speed## Install
```sh
GO111MODULE=on go get -u github.com/raviqqe/rnm
```## Usage
```sh
rnm 'foo bar' 'baz qux'
```For more information, see `rnm --help`.
## Examples
Given a file named `foo_bar.go`:
```go
const FOO_BAR = 42type FooBar struct {
fooBar int
}func (f FooBar) fooBar() {
println("foo bar")
}
```When you run `rnm 'foo bar' 'baz qux'`, you would see a file named `baz_qux.go` with contents:
```go
const BAZ_QUX = 42type BazQux struct {
bazQux int
}func (f BazQux) bazQux() {
println("baz qux")
}
```## License
[MIT](LICENSE)