The replacer is a configuration-based file replace tool
177
The replacer is a configuration-based file replace tool.
The first need Go installed (version 1.21+ is required), then you can use the below
command to install replacer.
go install github.com/no-src/replacer/...@latest
Create a config file named replacer.yaml, content is as follows
name: the configuration of replacer
version: v0.0.1
items:
- name: replace domain
paths:
- "*/test.yaml"
rules:
- old:
- 127.0.0.1:8888
- 127.0.0.1:9999
new:
test: test-github.com
uat: uat-github.com
product: product-github.com
Now running the command below start to replace the files.
$ replacer -root="./testdata/testfile" -tag=test
Content type
Image
Digest
sha256:c5b6c6afd…
Size
8.6 MB
Last updated
almost 3 years ago
docker pull nosrc/replacer