Skip to content

A simple library to redact sensitive data

License

Notifications You must be signed in to change notification settings

nhatthm/go-redact

Repository files navigation

Redact

GitHub Releases Build Status codecov Go Report Card GoDevDoc Donate

A simple library to redact sensitive data.

Prerequisites

  • Go >= 1.18

Install

go get go.nhat.io/redact

Usage

package main

import (
	"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

paypal

       or scan this