https://github.com/nhatthm/go-redact
A simple library to redact sensitive data
https://github.com/nhatthm/go-redact
golang redact redaction
Last synced: 6 months ago
JSON representation
A simple library to redact sensitive data
- Host: GitHub
- URL: https://github.com/nhatthm/go-redact
- Owner: nhatthm
- License: mit
- Created: 2023-05-23T14:27:59.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-01-06T16:31:59.000Z (9 months ago)
- Last Synced: 2025-02-10T09:45:04.984Z (8 months ago)
- Topics: golang, redact, redaction
- Language: Go
- Homepage:
- Size: 31.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Redact
[](https://github.com/nhatthm/go-redact/releases/latest)
[](https://github.com/nhatthm/go-redact/actions/workflows/test.yaml)
[](https://codecov.io/gh/nhatthm/go-redact)
[](https://goreportcard.com/report/go.nhat.io/redact)
[](https://pkg.go.dev/go.nhat.io/redact)
[](https://www.paypal.com/donate/?hosted_button_id=PJZSGJN57TDJY)A simple library to redact sensitive data.
## Prerequisites
- `Go >= 1.18`
## Install
```bash
go get go.nhat.io/redact
```## Usage
```go
package mainimport (
"fmt""go.nhat.io/redact"
)func ExampleValues() {
r := redact.Values("hello")result := r.Redact("hello world!", "hello there")
for _, s := range result {
fmt.Println(s)
}// Output:
// ****** world!
// ****** there
}
```## Donation
If this project help you reduce time to develop, you can give me a cup of coffee :)
### Paypal donation
[](https://www.paypal.com/donate/?hosted_button_id=PJZSGJN57TDJY)
or scan this
![]()